Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to run a cron job every day at 8:10pm.

10 20 * * * curl -s -o /dev/null

however, it doesn't work.

If I try to run it every minutes:

* * * * * curl -s -o /dev/null

it works fine. What gives?

The command "date" yields the correct time on my server.

share|improve this question
Have you checked your log file? cron usually writes to /var/log/messages – katriel Dec 19 '10 at 20:35
There is nothing regarding the cron job in messages.log – Bastien Dec 19 '10 at 20:36
I found cron entries in syslog and realized the timestamp is off by 5 hours. I thought cron jobs went by the server time? – Bastien Dec 19 '10 at 20:44
up vote 2 down vote accepted

change UTC from yes to no in /etc/default/rcS. It works now.

share|improve this answer

The above should be working just fine. Here's a list you can try:

  • Try a different time - e.g. set it to run 5 minutes after now and see if it works
  • Try a different user
    • Or a different crontab (/etc/crontab or another user's crontab)
  • Try a simpler command (e.g. echo works > /tmp/cron-works)
    • You can also just prepend the above to your curl (e.g. echo works > /tmp/curl-works; curl ...) or something along these lines
    • It's also good to add another cron entry at the same time which does echo and leave your curl in there as is
  • Check the logs - /var/log/syslog should show it executing the commands and possible failures
  • Confirm your curl actually ran - how do you know whether it ran? I assume you are looking at the logs for - if so, double-check the logs
  • Try special values such as @houry (see man 5 crontab for the complete list)

Also, how are you authenticating - if it's a network authentication, you may need to confirm this is working before any crontab executes.

share|improve this answer
Thanks for your reply. I found out the date in my syslog is different than the date I get when I run "date". What gives? – Bastien Dec 19 '10 at 20:48
@Bastien I see you found a solution yourself - tricky one, I might say... – Dec 20 '10 at 1:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.