Decided to change your command arounda little, hmm?
I’m not sure, but I suspect that you need to use a differnet path to php. For your command to run every 15 min, every day of the week, you want it to look like this:
*/5 * * * * /usr/local/bin/php /home/user/mydomain/folder/crawler/crawl.php
Or you can still use wget if you prefer, that would look like this:
*/5 * * * * /usr/bin/wget -q /home/user/mydomain/folder/crawler/crawl.php
The alternative method listed in the wiki, I believe is for choosing which version of php to use for parsing your script. But I’m not really familair with that, so I don’t know.
There is no need to specify days 0-6, using * will tell it just to do it every day.
You should add a
to the top of your cron file so you get error messages. This way you’ll hoepfully get some response from cron to know where you problem is.
The easiest way I know of to test and see if cron is running is to put in a command like this in your cron file:
and make sure to have that mailto piece at the top. That should set cron to try and run the script every min. Just check your E-mail now. If cron is running, and I’m pretty sure it is, you’ll have an error message waiting for you.
On and side note, you can use the commanand “whereis” to help figure out the ‘full path’ to a program. For instance I logged into SSH for my server and typed:
and it returned:
php: /etc/php /usr/local/bin/php /usr/local/lib/php
I then decided to doucle check the location of wget, so I typed:
and it returned:
wget: /usr/bin/wget /usr/share/man/man1/wget.1.gz
You genearlly want to using the path with bin in it. If you see lib, it’s a backend library, and share is generally for manual pages.
Hope this helps.
art.googlies.net - personal website