Python script run via cron does not execute occassionally?

The most likely explanation is that once in a while the script takes more than two minutes (maybe the system's very busy occasionally, or the script may have to wait for some external site that's occasionally busy, etc) and your cron's a sensible one that skips repeating events that haven't yet terminated. By logging the starting and ending times of your script, you'll be able to double check if that is the case. What you want to do in such circumstances is up to you (I recommend you consider skipping an occasional run to avoid further overloading a very busy system -- your own, or the remote one you're getting data from).

There is logging throughout the python script at various points, but in the instances where the process spawned by crond hangs none of the lines from the python script are logged or executed. – gcorne May 7 '10 at 1:22 @gcome, if you don't log the exact starting and ending time of the previous run, you can't check whether my hypothesis (that said ending time is simply after the otherwise-scheduled running time of the next run) is correct. – Alex Martelli May 7 '10 at 3:27 I have added the entire script, which shows where/how I was logging the various actions taken in the script.In my analysis of the logs, the times of the last event (completion of the write) are finished far before the start of the next cron start time.

Nonetheless, I will see if your suggestion bears fruit. – gcorne May 7 '10 at 22:49.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions