On 18/06/07, Wildemar Wildenburger <[EMAIL PROTECTED]> wrote:
> 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.

If the script finishes abnormally, the file will still exist and
future execution of the script will fail.

:)




-- 

Tim Williams
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to