|SNOOZE(1)||General Commands Manual||SNOOZE(1)|
snooze — run a
command at a particular time
The options are as follows:
The durations randdelay and
slack and timewait are parsed as
seconds, unless a postfix of
m for minutes,
h for hours, or
d for days
The remaining arguments are patterns for the time fields:
The following syntax is used for these options:
and combinations of those, e.g.
The defaults are
-d* -m* -w* -D* -W* -H0 -M0
-S0, that is, every midnight.
snooze receives a
SIGALRM signal, the command is immediately
Optionally, you can keep track of runs in time files, using
-T is passed, execution will not
start earlier than the mtime of timefile plus
snooze will start finding the first matching time
starting from the mtime of timefile, and taking
slack into account. (E.g.
-H0 -s 1d
-t timefile will start an instant execution when timefile has not
been touched today, whereas without
-t this would
always wait until next midnight.)
If timefile does not exist, it will be assumed outdated enough to ensure earliest execution.
snooze does not update the timefiles, your
job needs to do that! Only mtime is looked at, so
touch(1) is good.
snooze utility exits 0 on
success, and >0 if an error occurs.
The command is run using exec, so its exit status gets propagated to the parent.
If no command was given,
returns with status 0.
Leah Neukirchen <email@example.com>
snooze is in the public domain.
To the extent possible under law, the creator of this work has waived all copyright and related or neighboring rights to this work.
|January 4, 2016||x86_64|