Run php script using cronjob / crontab

scmuser created the topic: Run php script using cronjob / crontab
How can i Run php script using cronjob / crontab???

Any ideA?

rajeshkumar replied the topic: Re: Run php script using cronjob / crontab
If your PHP scripts do have executable permissions like 755 or -rwxr-xr-x and they have one of the PHP filename extensions above, then you do not need to specify the php interpreter in the command portion of your cron line, like this:

5 17 * * 2 /myscript.php

The above cron would run myscript.php in your home directory every Tuesday at 5:05PM.

some more example…

28 14 * * * /usr/local/bin/php -q /myscript.phtml
6 3 20 4 * /usr/local/bin/php -q /htdocs/www/x.php
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn