How it works
- Pick the routine to look at.
- It's true when that routine has a run in progress; the run doing the check never counts itself, so it can also ask "is another copy of me already running?".
- With no routine chosen it simply answers false.
Routines that use it
Don't back up twice
Before a backup routine zips a folder with Zip files, check whether the same routine is already running and stop with Stop routine if it is.
Hold until another finishes
Put the check in a Wait until so a cleanup routine starts moving files with Move or copy file only after the download routine is done.
Cancel a stuck job
On a hotkey, if a long routine is still running, end it with Cancel routine and show a banner.
Questions
- Can a routine tell if it's already running?
- Yes. Pick the same routine; the current run is left out, so the check is true only when another copy is in progress.
- How do I stop a routine that's already running?
- Check it with Routine is running, then use Cancel routine to end its runs.