Running PHP with Crontab
Posted by: keleth
Posted on: 2008-03-01 22:09:00
I've read up on the wiki about using crontab to run PHP scripts at set times. I guess I don't exactly understand the DH wiki, and so with some websearching came up with some stuff, but don't know if it works with DH because of the shared hosting. Is the following line proper to execute a PHP script at midnight each sunday? Is it also important to note that I have my own copy of PHP running so I can modify my .ini file, that I set up using the directions on the DH wiki.
0 0 * * 0 php /home/site/folder/script.php
and put
#!/usr/local/bin/php -q
at the top of the PHP script?