I have whmcs installed and have Code: /usr/bin/php -q /var/www/clients/client0/web1/web/clients/crons/cron.php setup in the ispconfig cronjob section, but the cronjobs are not working, the logs dont show any issues, only wget crons are working. below is the cron.d output file for web1: Code: MAILTO='' SHELL='/bin/sh' 0 */4 * * * web1 /usr/bin/php -q /var/www/clients/client0/web1/web/clients/crons/domainsync.php > /dev/null & >/dev/null 2>&1 #example.com */5 * * * * web1 /usr/bin/php -q /var/www/clients/client0/web1/web/clients/crons/pop.php > /dev/null & >/dev/null 2>&1 #example.com */5 * * * * web1 /usr/bin/php -q /var/www/clients/client0/web1/web/clients/crons/cron.php >/dev/null 2>&1 #example.com 0 0 * 1 * web1 /usr/bin/php -q /var/www/clients/client0/web1/web/clients/modules/registrars/netearthone/netearthonesync.php >/dev/null 2>&1 #example.com please advise.
I don't know whmcs in detail, so I can't tell you if the cronjobs are correct for them. In any case, the crons are not jailed so the mentioned php file sshould get executed by PHP as web1 user at the configured times.
what if i remove >/dev/null 2>&1 because i dont know what thhis means and i added it because i seen other crons with it? if not then maybe i will apply cron to crontab -e!
this sends the script output to /dev/null to avoid that you get an email on every script run, it should not affect the script itself. But feel free to remove it.
no effect, what about permissions and owner:group within the /etc/cron.d folder, is it meant to be root, web1 or ispconfig?
Then folder and files are owned by root. Did you test that your scripts work when not executed by cron? sudo -u web1 /usr/bin/php -q /var/www/clients/client0/web1/web/clients/crons/domainsync.php
Thanks, I already did this in browser and it works, but still had issue with cron getting triggered, but your suggestion to run command in the terminal helped, first i ran: Code: sudo -u web1 /usr/bin/php -q /var/www/clients/client0/web1/web/clients/crons/domainsync.php which worked fine with no issue, so i then ran the main whmcs system cron: Code: sudo -u web1 /usr/bin/php -q /var/www/clients/client0/web1/web/clients/crons/cron.php which showed this output Unable to communicate with the WHMCS installation. Please verify the path configured within the crons directory config.php file. the problem was their was another config file in the cron folder that did not get updated when i moved my whmcs from a subdirectory to a subdomain, so i changed details and now it works as it should. thanks