3 ms·
Sometimes good to use for cron jobs so that the previous one won't keep running on top of the current run. You should debug for it to not happen though but pro
by mekster 7y ago
Sometimes good to use for cron jobs so that the previous one won't keep running on top of the current run.
You should debug for it to not happen though but probably better than seeing your system choke with dozens of instances even slowing the jobs more.
There's also "run-one" that allows you to control which job should survive instead of just killing the old one.
http://manpages.ubuntu.com/manpages/trusty/man1/run-one.1.html http://manpages.ubuntu.com/manpages/trusty/man1/run-one.1.ht...
- majewsky 7y agoIf you're using systemd timers, you get this behavior for free because those timers only activate service units. If the service is already active, nothing happens. (Of course, this can be surprising in a different way when you expect a new job to start, but it does not because a previous one is still lingering. Not saying it's better or worse, just pointing out for those who don't know.)