avoid script running twice
Wildemar Wildenburger
wildemar at freakmail.de
Mon Jun 18 13:13:49 EDT 2007
Robin Becker wrote:
> I wish to prevent a python script from running twice; it's an hourly job, but
> can take too long.
>
> [snip]
> but it occurs to me that I might be killed with prejudice during the long
> running work(). Is there a smart way to avoid running simultaneously.
>
Well I can think of a dumb way: create a temporary file during the
transaction and have your script check for that before running its main
body.
I think thats the most hassle free way of doing it.
/W
More information about the Python-list
mailing list