jagguy
asked on
basic cronjob
Hi,
How do I call a function via a cronjob (using php). I am using cpanel.For example I want to print hello world once an hour . The cronjob example are complicated and i cant get basic function working.
This calls a function but it is for a xero conection so it is more than what I need.
cd /home/aptutori/public_html /mytestser ver/app && Console/cake invoicing uploadstatscronjob
How do I call a function via a cronjob (using php). I am using cpanel.For example I want to print hello world once an hour . The cronjob example are complicated and i cant get basic function working.
This calls a function but it is for a xero conection so it is more than what I need.
cd /home/aptutori/public_html
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
0 * * * * user /path/to/php /full/path/to/script.php > /dev/null 2>&1
You will specify the user that you want the cron job to run under, the actual path to php, and the actual path to the php script.
If you want to receive emails remove the "> /dev/null 2>&1".