Your Drupal cron might be currently failing simply because your server time is ahead or behind

Per instructions on http://drupal.org/cron I've added the the following line to server's cron job:

# crontab -e

44 * * * * /usr/bin/lynx -source http://akyl.net/cron.php

The time on the upper right corner of my MacPro's display was showing exactly 1.43 pm. After one minute passed I checked the status of cron on http://akyl.net/admin/reports/status and, alas, cron didn't yet run. Googling gave lot's of long discussions like one on http://drupal.org/node/143519 just quickly glancing on which gets you confused with lot's of possible reasons for the failure.

After trying several different things with no joy, it dawned on me to see the server time and, bingo, it was little bit ahead. So if I waited one hour then I would see my Drupal site's cron running. Now there is another possibility of you hitting this issue - when your personal computer's time, according to which you were setting cron job, is little behind than of your servers. So it is up to you to find out which one was running behind or ahead and have the time adjusted.

Adjusting the server time on Ubuntu can be done by running:

ntpdate ntp.ubuntu.com

Add new comment

Filtered HTML

  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
To