Cron Jobs - Not Performing Them :-(

Mick007

Well-Known Member
Oct 31, 2004
50
0
156
Hi Guys,

Need a little help here please. Iv setup a cron job to run every 5mins. Yea i know, EVERY 5MINS. But it has to be ran every 5 mins because of the service i offer.

Iv put the details as this:

php -q /home/tosms/public_html/autosms/check_email.php

and done it for every 5mins but it just doesnt seem to run it. I also dont get any email from the log of the cron.

Can anyone help me out please.
 

dwh2

Well-Known Member
Jan 14, 2004
106
0
166
What happens when you run it from the command line? Does it work?
Make sure you try it from the command line as the same user that will run the cron.
 

HostIt

Well-Known Member
Feb 22, 2003
151
1
168
Also, be sure you have actually set it correctly to run every 5 minutes.

I only say this because I just had the identical problem myself. After some digging around I discovered that at some point I had accidentally set the "hour" number also. The combination I had given meant that the cron job never ran. To be sure, your cron job should look something like this (or with the full path to php as suggested by cpanelkenneth):

*/5 * * * * php -q /home/tosms/public_html/autosms/check_email.php
 
Last edited: