Hello all, I have more more todo on a script I just finished. Prevent it from executing again if the process is running from the last job. Can't go to production without it.
Ex. it runs in cron every hour to process batches of large size files. Potentially the processing could take longer than one hour depending on the file submissions. So, IF: no lock file, create a lock file, execute, delete lock file when finished successfully. ElSE: the script is running, exit. Then, cron will try again an hour later. I do not necessarily require a "lock file" just looking for a recommendation on a best practice with low complexity to make this work. I was hoping not to use the subprocess module to simulate what could be done in Bash. But, if that's the answer then so be it. Thanks, Ad^2 _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
