Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a cron task that calls a special PHP script via wget. Here is the crontab entry:

0 * * * * wget http://www....

It will work perfect for several days, running on the hour. However, after a few days the cron job will start to be called several times an hour. I have never seen CRON drift like this, so I imagine it can't really be a CRON issue. However, the logs of the script that is called clearly show it running several times an hour.

Server details:

  • Ubuntu Luci
  • Apache
  • MySQL
  • PHP5
  • Time is showing correct @ command line
  • Server is setup to sync with a NTP server

In order for the script to run it must be passed a unique 50-character hash key in the URL, so this script isn't being called from any other source accidentally.

What might cause CRON to drift like this?

share|improve this question
1  
You say "the logs of the script that is called", but what about the logs of the cron job? –  Dennis Williamson May 6 '10 at 22:28
add comment

1 Answer

up vote 2 down vote accepted

I'd guess that it's not completing for whatever reason and eventually spawns multiple processes.

What's the script in full?

What's the log output?

Provide complete and intimate details regarding why you believe what you do. If you're running a common cron daemon, I'd think it more likely that you're misinterpreting the situation.

It sounds like you may be basing this theory off the access logs. If so, you could wrap wget in a script and enable additional system level logging, which could more intimately detail the behavior. But I'm guessing, as you don't provide full details.

share|improve this answer
    
@Warner - Outstanding point. I'll add some system level logging and report back. –  Justin May 6 '10 at 22:27
    
To be specific - the wget command was timing out and trying again. –  Justin May 10 '10 at 2:20
add comment

Your Answer

 
discard

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.