." intlink tagname rest .de intlink . ie \\n[www-html] \{\ . HTML \\$1\\$2 . \} . el \{ \fB\\$1\fR\\$2 \} .. ." extlink URL text rest .de extlink . ie \\n[www-html] \{\ . HTML \\$2\\$3 . \} . el \{ \fB\\$1\fR\\$3 \} .. .de manlink . ie \\n[www-html] \{\ . HTML \\$2\\$3 . \} . el \{ \fB\\$2\fR\\$3 \} .. .de paragraph .HTML
.P .. .de section . ie \\n[www-html] \{\ .HTML
. \} . el \{ .SH \\$1 . \} .. .de subsection . ie \\n[www-html] \{\ .HTML
. \} . el \{ .SS \\$1 . \} .. ." type name (args ..." .de func .HTML
.IP .. .de endoptions . HTML
uschedule --from "2003-4-1 00:00:00" JOBID '*-*-* 00:00:10' .HTML.fi .optionparagraph TIMESPEC should be simple. Wild cards are only allowed at the start, \fInot\fR after any fixed number. \fI2002-*-1 00:00:00\fR is forbidden, \fI*-*-* *:00:00\fR is OK. .optionparagraph Weekday names may be used, too, though the result is likely to be non-intuitive. Better avoid them. .optionparagraph This option was added in version 0.6.0. .option "-l, --late=SECONDS" Allow the job to be executed up to \fISECONDS\fR late. This is useful if the machine or the .manlink uscheduled.html uscheduled(8) daemon was down during the time the job should have run. .optionparagraph The default is 3600 seconds (one hour). .option "-t, --to=TIMESPEC" Jobs will only be started if \fITIMESPEC\fR has not been reached. This together with the \fI--from\fR option allows to further restrict the times a job will be started. The example below starts a job every day a few seconds after midnight, but only up to 30th of march, 2004: .paragraph .nf .HTML
uschedule --to "2003-4-1 00:00:00" jobid '*-*-* 00:00:10' .HTML.fi .optionparagraph TIMESPEC should be simple. Wild cards are only allowed at the start, \fInot\fR after any fixed number. \fI2002-*-1 00:00:00\fR is forbidden, \fI*-*-* *:00:00\fR is OK. If wild cards are used, the --from option has to be used, to. .optionparagraph Weekday names may be used, too, though the result is likely to be non-intuitive. Better avoid them. .optionparagraph This option was added in version 0.6.0. .SH "TIMESPEC" A time specification consists of two or three words. The first, optional, words specifies a day-of-week, the next the year, month and day-of-month, and the last word specifies hour, minute and seconds. .br Words are separated by exactly one space. .subsection "Day Of Week" The day of the week is given as a comma separated list of weekday names or three letter abbreviations thereof. Names are case insensitive. The default is to run the job at any day of the week. .paragraph \fISunday,Wed\fR is a valid list. \fIMonday, Tues\fI isn't. .subsection "Date" The date consists of three parts: Year, month and day. Two parts are separated by a single dash. Each part is a numerical value as described below. .subsection "Time" The time consists of three parts, too. Hour, minute and second are by a single colon. Each part is a numerical value as described below. .subsection "Number Specification" Whenever is number is allowed in a job execution time specification is may be either a single value, a single star ("*", meaning "all possible values") or a comma separated list of values. .br A value may be a number or a number ("a") followed by a slash followed by a number ("b"), meaning "execute at 'a+b*n'", where "n" is a positive integer including 0). You may use a plus sign instead of the slash ('a+b'). .br Note that 30/10 (oder 30+10) and such things are understood quite literally, meaning "30, 40, 50" and not "0, 10, 20, 30, 40, 50". .subsection "Examples" The following schedules a job to be run at midnight of each seventh of the month: .nf .HTML
*-*-7 00:00:00 .HTML.fi .paragraph To run a job on every monday in december at 12:00:00: .paragraph .nf .HTML
Monday *-12-* 12:00:00 .HTML.fi .paragraph To run a job 30 minutes and 45 seconds after each full hour on every monday and friday if that day is the first or third day of the month in the months january, march, may, juli, september and november: .paragraph .nf .HTML
mon,fri *-1/2-1,3 *:30:45 .HTML.fi .paragraph .subsection "Incomplete time specs" \fIuschedule\fR attempts to complete the TIMESPECs, except for the --from or --to ones. \fI*-\fR is used when year or month is missing, \fI*\fR is used when the day is missing, and \fI*:\fR is used when hour or minute are missing. If there is no time given at all, then \fI0:0:0\fR is used. Examples: .paragraph .nf .HTML
03-05 08:05:40 -> *-03-05 08:05:40 05 08:05:40 -> *-*-05 08:05:40 08:05:40 -> *-*-* 08:05:40 05:40 -> *-*-* *:05:40 40 -> *-*-* *:*:40 Sat,Sun 05 08:05:40 -> Sat,Sun *-*-05 08:05:40 Sat,Sun 08:05:40 -> Sat,Sun *-*-* 08:05:40 2003-03-05 05:40 -> 2003-03-05 *:05:40 2003-03-05 -> 2003-03-05 0:0:0 03-05 -> *-03-05 0:0:0 .HTML.fi .paragraph .SH "TIME OFFSET" An argument consisting of a plus sign and one to four numbers separated by colons (+[[[dd:]hh:]mm:]ss) means to start the job once in the future, at the time reached with the current time is added to the argument. dd is the offset in days, hh in hours, mm in minutes und ss stands for seconds. That is, .nf .HTML
uschedule test +1:0:0:0 uschedule test +24:0:0 uschedule test +1440:0 uschedule test +86400 .HTML.fi all start the job "test" exactly one day after uschedule is executed. .paragraph .SH DIFFERENCES The unix \fIcron\fR daemon executes a job if either day or week or day of month matches. .manlink uscheduled.html uscheduled(8) executes it if \fIboth\fR match. The is no way to completely mimic either logic with the other software. .paragraph Unix \fIcron\fR often needs a separated \fIat\fR daemon to execute one-time-jobs. This is nothing more than a design problem in cron. .paragraph Unix also provides a \fIbatch\fR command, which executes jobs if the system load is low. This is often implemented inside the \fIat\fR daemon. \fIuschedule\fR doesn't provide a way to emulate this (note that \fIbatch\fR is pointless anyway: if you just have a short job then you might as well run it, it doesn't matter. If you have a long and resource-intensive job and don't want your job to eat resources when there's a shortage of them then \fIbatch\fR provides no way to temporarily suspend a job during this time. If the resource in question is not system load but memory, disk- or network-bandwidth then \fIbatch\fR doesn't help you). .paragraph Unix \fIcron\fR doesn't support second granularity. \fIuschedule\fR does this for only one reason: to help to avoid that all jobs of all users start in the same second and overload the system. .SH AUTHOR Uwe Ohse, uwe@ohse.de .SH "SEE ALSO" .manlink uschedulecmd.html uschedulecmd(1) , .manlink intro.html uschedule_intro(7) . .HTML