Sure, Dave.

See:
 * 
http://blog.dustinkirkland.com/2011/02/introducing-run-one-and-run-this-one.html

Basically, imagine having a long running cronjob, like an rsync, that
might take an hour or more sometimes.  But you want to run this
cronjob every, say 10 minutes.  something like:
 */10 * * * * rsync -a foo:/bar bar:/foo

If that rsync takes longer than 10 minutes, you'll end up with a bunch
of rsync processes over time.

Instead, you can use the run-one utility like so:
 */10 * * * * run-one rsync -a foo:/bar bar:/foo

This will ensure that no more than one copy of that rsync is running
as this user at any time.

Alternatively, the run-this-one utility will kill any previous
existing copies, and run *this* one, which might be useful for killing
a hung process.
 */10 * * * * run-this-one rsync -a foo:/bar bar:/foo

Thanks,
Dustin

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/888770

Title:
  [MIR] run-one

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/run-one/+bug/888770/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to