Page 1 of 1

cron tab for php script

Posted: Tue Jun 10, 2008 7:52 am
by kkonline
If i write wget -q --tries=1 --timeout=10 --delete-after path/to/script.php in the cpanel cronjobs in order to run this script every hour
i receive a /bin/sh: /usr/bin/wget: Permission denied
in the email and the task is not performed

Basically this is a script to send newsletter to subscribers in small chunks of 50 per hour. The script runs from browser and is 644 in attributes.
How to make it run using cron tab. I have a cpanel

Re: cron tab for php script

Posted: Tue Jun 10, 2008 8:02 am
by VladSun
What about:

Code: Select all

wget -q --tries=1 --timeout=10 --delete-after http://localhost/script.php
or

Code: Select all

php -q path/to/script.php