Control Web Panel

WebPanel => PHP => Topic started by: intellitech on January 31, 2015, 04:40:25 PM

Title: PHP Cron Job
Post by: intellitech on January 31, 2015, 04:40:25 PM
Trying to run a cron via the crontab in a user account, doesn't seem to trigger the job.
Cron was set to run every 5 mins, and the command line to the php script used is as follows: php -f /home/demo/public_html/cron.php

This however doesn't seem to be working - although the cron saves & shows as active in the webpanel.

Any ideas?
Title: Re: PHP Cron Job
Post by: Administrator on February 04, 2015, 01:41:55 AM
try using a full path for your php

from command line you can get a full path
which php
Title: Re: PHP Cron Job
Post by: ali on May 21, 2015, 08:00:56 AM
Dear All.  This is how my cron job worked.

* * * * * /usr/local/bin/php /home/username/public_html/crontest.php