Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: only run if X seconds have elapsed (time differences in seconds)



On Sat, Dec 29, 2012 at 6:34 PM, Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> wrote:
> One other note -- there is a potential race condition during the short
> time between doing the glob and writing to the file.  Two runs of the
> script that are close enough to simultaneous might both find the file
> to be "old enough".

True enough, but I intend to run this via `launchd` every ~4 hours. I
don't want it to run more often than once a day, but since the
computer might be asleep at times, I figured doing a "how long since
this last ran?" check was a good alternative.

TjL



Messages sorted by: Reverse Date, Date, Thread, Author