I have this Django cron job script (I am using kronos for that, which is great).
Since I trigger this job every minute, I want to make sure that there isn't another instance of the script already running. If there is a previous job running, then I want to skip the current execution.
I know I can do that with a lock file, but that's not very reliable and can cause problems when you reboot in the middle of an execution (you have to clear the lock file), etc.
What's the best way to do this using Python (Django in this case)?
EDIT: I am targeting Linux, sorry for leaving this out.