Control Web Panel

WebPanel => How to => Topic started by: pixelpadre on July 25, 2016, 11:09:33 PM

Title: Cron job not working within cwp
Post by: pixelpadre on July 25, 2016, 11:09:33 PM
I am not having any luck with my cron jobs

*/15 * * * * /usr/local/php /home/username/public_html/usersite.com/oc-includes/osclass/cron.php >> /home/username/myfile.log

Any ideas what is wrong?
Title: Re: Cron job not working within cwp
Post by: Administrator on July 26, 2016, 11:54:08 AM
you are not using the correct php path, you have the correct path in the cwp cron

Code: [Select]
Don't forget to always use a full path, eg. /usr/local/bin/php
Title: Re: Cron job not working within cwp
Post by: pixelpadre on July 26, 2016, 02:09:55 PM
I thought that meant the path to php.ini.

Log file for user says:

ABS_PATH is not loaded. Direct access is not allowed.  I guess you cant call cron.php directly.......
Title: Re: Cron job not working within cwp
Post by: driftwood on July 26, 2016, 02:56:38 PM
If it helps at all this works for me;

5,20,35,50 * * * * wget -q -O - http://mysite.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

Thats to call the wordpress cron instead of having it shoot via page loads.
Title: Re: Cron job not working within cwp
Post by: hostuga on December 16, 2016, 12:41:38 AM
Attention Correct Cron job.

I copied with no whmcs -> php -q /home/username/public_html/customers/admin/cron.php   
Attention, leave space eg.  php /Home   1 space.

cronjob Configured correctly      */5 * * * * /usr/local/bin/php /home/username/public_html/customers/admin/cron.php
Title: Re: Cron job not working within cwp
Post by: digdug on October 31, 2021, 07:19:37 AM
and this is happen new version fresh install on centos 7
cron job cannot create