cron tab for php script

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kkonline
Forum Contributor
Posts: 251
Joined: Thu Aug 16, 2007 12:54 am

cron tab for php script

Post 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
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: cron tab for php script

Post 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
There are 10 types of people in this world, those who understand binary and those who don't
Post Reply