Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: only run if X seconds have elapsed (time differences in seconds)
- X-seq: zsh-users 17505
- From: TJ Luoma <luomat@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: only run if X seconds have elapsed (time differences in seconds)
- Date: Sat, 29 Dec 2012 20:00:03 -0500
- Cc: Zsh-Users List <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=hxyx66IRsp26u4wbDYHUM05aePwNgvFWPt8PQqlR+X8=; b=C+tfPg5hCY1GOy7IuAKaI0Ii8XHYuoZQHW0/PfdsFKv2nEiOxURhKaR23q6rm+SJfD 9BUtVXnYDm55WR7u2tehqZEF2s/0yPDI3dorDZoEURpmGzE9ec5Yu4cIrdHyFR3l+I8M WmEU+BjNXO2dW6P2ZZGnbs6JwcoCBqUAIublkfFsONJpXpPmN3WHhwIUM7AwcWMFYMCi NxkCrK13BElSgq5Uye2C453Eiyu18+q8O2IqjRAC9gg0i8dK2JUIDMvSgTV3qjzKx8Bn Mi0f7QtGNN/0fS5hzhA6HnL47mhxAGqosCvqTWxE+tfUW34gnY1iWxq+num0GY9SChBj Ydiw==
- In-reply-to: <121229153449.ZM7616@torch.brasslantern.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CADjGqHtgatYEHyus2ru8vUPUJJQH48nGNVH8XbvV11nr0HhpGg@mail.gmail.com> <121229153449.ZM7616@torch.brasslantern.com>
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