3 ms·
Isn’t that the same? Just because you check a file lock in your script doesn’t mean that other invocations of the program without the script will check the lock
by eska 3y ago
Isn’t that the same? Just because you check a file lock in your script doesn’t mean that other invocations of the program without the script will check the lock.
- pengaru 3y agoNo, it's not the same. The crontab entry reflects what you'd run to reproduce what the crontab does.
- eska 3y agoOk, but your original criticism stated that solving this in cron is bad because the program may be run outside of cron: * It's not just cron that can cause concurrent execution, and if that matters you generally want to robustly prevent it - not just if cron is the executor.* So you did not like that exclusion only worked when triggered from cron. But in your case it also only works when triggered from your script. So cron just made your script an integrated feature and you’re essentially criticizing your own solution.
- Apofis 3y agoLock files in scripts are actually pretty unreliable, learned this the really hard way and the lesson cost $10's of thousands of dollars.
- r3trohack3r 3y agoSurprised to see this, mind sharing the experience? How did the lock fail? Was there a more reliable fix?