I have a cronjob similar to this:
*/1 * * * * /usr/bin/python /home/root/test.py >> /home/root/spring.1
In test.py, I am just printing the current time. After few mins of observation, I see this in spring.1 log file:
17/12/2009 10:09:01 AM
17/12/2009 10:09:01 AM
17/12/2009 10:09:01 AM
17/12/2009 10:09:01 AM
17/12/2009 10:09:01 AM
17/12/2009 10:10:01 AM
17/12/2009 10:10:01 AM
17/12/2009 10:10:01 AM
17/12/2009 10:10:01 AM
Anyone know what the problem may be? The python script is simply outputting the current time so we can say for sure that its cronjob which is opening the python multiple times.
Thanks.
-
Have you tried
crontab -l? It might seem obvious but you might have the same script added several times. That's all I can think of.http://unixhelp.ed.ac.uk/CGI/man-cgi?crontab+1
From Nick Fortescue -
thanks guys. rebooting the box fixed it. still not sure what the problem was but i think it may be that due to the number of edits i'd done to the cron configs, there were multiple instances of cron running.
-
There was such a question here: the problem was in several cron instances running at once :)
From o_O Tync
0 comments:
Post a Comment