I've never seen this before, my Status Report page says the last cron run was 35 minutes ago at 10:35 today. So I went to watchdog logs and could see that Cron run completed at 10:30.

I've set the cron to run on 0 and 30th minutes of every hour, so twice per hour using sudo crontab -e so it's using the root user's crontab with the following command (cron key intentionally removed):

0,30    * *   *   *     wget -O - -q -t 1 http://localhost/cron.php?cron_key=

I'm not using the cron.module aka poormanscron in D6

I've manually run the cron and it updated the Status Report page after that.

What could cause this weird behavior? I'll admit that I haven't tried flushing the caches, but could caching be the cause of this? Or is there something more sinister?

I've dug around in syslog and found an error relating to the cron, but I have no idea what this means (cron key intentionally removed):

Aug 16 10:30:01 drupal-1 CRON[31372]: (root) CMD (wget -O - -q -t 1 http://localhost/cron.php?cron_key=)
Aug 16 10:30:01 drupal-1 CRON[31370]: (CRON) error (grandchild #31372 failed with exit status 4)

I can see the grandchild #31372 is referring to the first line CRON[31372] but what does exit status 4 mean?

I just wanted to also let people know that the cron has run without any problems so far afaik. But it could be that this is the first time I've noticed this as well.

  • Do you have a 'proper' cron set up or are you using the built-in auto-cron? If it's the latter, it just means that from 10:30 no-one visited the site until 10:35, so the auto-cron didn't get invoked
    – Clive
    Aug 16, 2013 at 9:54
  • @Clive I've updated the question
    – Beebee
    Aug 16, 2013 at 10:00
  • Hmm might be worth checking the syslog to check that cron job was fired off properly (I'm sure it will have been, just a good idea to make sure). I can't remember if the 'last ran' is the time at the start of the cron job or the end - if it's at the end, and the job had a max execution time of 300 seconds, and perhaps timed out, that figure might make sense
    – Clive
    Aug 16, 2013 at 10:04
  • @Clive updated the question with syslog message. It shows that the cron started at 10:30:01 and errored out at the same time, so it couldn't have been a timeout.
    – Beebee
    Aug 16, 2013 at 10:42
  • 1
    I'm almost positive status 4 for wget is a network error, so it may just have been a temporary network problem. Or server config might have changed and localhost might not resolve locally any more. Either way the easiest test is to run the command manually and see if it exits with an error again. If not, I think you're safe to assume it was an intermittent internal network problem
    – Clive
    Aug 16, 2013 at 10:55

1 Answer 1


Ok, I'm such an idiot sometimes.

I've edited the .htaccess file this morning to redirect without www. to www.domain.com and that has caused my cron going to localhost to be redirected to www.localhost which caused the cron to fail. /facepalm

But to answer exit status 4's meaning for wget according to this page it means Network failure (Kudos to @Clive)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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