Python Process Run Control
This module provides convenient ways to guarantee a certain script state.
Make sure only one instance of the program is running, this is done by acquiring an fcntl file lock on the current script:
>>> import run.alone
There are a few things to keep in mind:
Run until a specified timespec, if the process runs longer, it will be killed:
>>> import run >>> run.until('23m42s') >>> ...
You can also choose to limit on the amount of CPU-time being consumed (default is wall clock time):
>>> run.until('42s', 'cpu') >>> ...