caldelay program [arg ...]
$DELAY as necessary so that the
current time plus
$DELAY seconds will match the description of a
calendar time given by certain environment variables, and then runs the given
$DELAY is not set, this is interpreted as an
indefinite delay, and
caldelay leaves it unset. Controlling
environment variables include
$SECOND. All are optional. Each one
that is specified is a list of constraints. All calendar times that satisfy
at least one constraint for each time unit are considered to be matches.
Each constraint must take one of the following forms (otherwise,
caldelay exits with an error):
/n: matches times when the given unit is divisible by
=n: matches times when the given unit is exactly
-n: matches times when the given unit is exactly
n+mis one more than the largest value of the unit. (E.g.,
HOUR=-1is equivalent to
/0 is equivalent to
=0, because zero is
divisible by itself.
If a variable is not set in the environment, or is set to an empty string,
the default depends on which others are set. If any larger unit is set, then
the default is
=0; otherwise, the default is
For example, if
$HOUR is set and no others are, then
$WEEKDAY default to
/1 (i.e., no restrictions), and
$SECOND default to
$DELAY will be the number of seconds until the next
occurrence of the beginning of the given hour.
$MONTHDAYdiffer by one from what you might expect.
MONTH==0is January, and
MONTHDAY==0is the first of the month.
$WEEKDAYtogether with any of
$MONTHDAY. The results will probably not be what you expect, and may be subject to change in future versions.