SNOOZE(1)
π SNOOZE(1) β like, the general commands manual bestie β¨
okay so picture this: it's a manual page, right, and it's called snooze, and it lives in the General Commands Manual section (section 1, obviously π). she's a lil scheduling icon and she's about to eat π
πΈ NAME πΈ
snooze β run a command at a particular time β°β¨
π¦ SYNOPSIS π¦
snooze [-nv] [-t timefile] [-T timewait] [-R randdelay] [-J jitter]
[-s slack] [-d day] [-m mon] [-w wday] [-D yday] [-W yweek]
[-H hour] [-M min] [-S sec] command ...
no cap, that's the whole vibe up there π
β¨ DESCRIPTION β¨
snooze waits until a particular time and then runs a command. that's it, that's the girl π«Ά together with a service supervision system like runsv(8), you can literally use her to replace cron(8). main character energy fr fr π
the options are as follows, bestie, and there are a LOT of them so buckle up:
-nβ dry run πββοΈ she prints the next 5 times the command would run and then exits. no actual running, just vibes.-vβ verbose π£οΈ prints scheduled (and rescheduled) times. she's a talker.-t,-Tβ see below, in βTIMEFILESβ π-Rβ delays the determination of the scheduled time randomly up to randdelay seconds later π² (so even she doesn't know when she's picking it)-Jβ delays execution randomly up to jitter seconds later than the scheduled time π«§-sβ commands are executed even if they're slack (default:60) seconds late β±οΈ caveat, listen up: this will not result in immediate execution unless βTIMEFILESβ are used π
the durations randdelay and slack and timewait are parsed as seconds, unless you slap a postfix on there: m for minutes, h for hours, or d for days β³ iykyk
π the remaining arguments are patterns for the time fields π
-dβ day of month-mβ month-wβ weekday (0-7, sunday is0and7β she contains multitudes β¨)-Dβ day of year (1..366)-Wβ ISO week of year (1..53)-Hβ hour-Mβ minute-Sβ second
π the syntax for these options, bestie π
-d 3β exact match: run on the 3rd π―-d 3,10,27β alternation: run on 3rd, 10th, 27th π-d 1-5β range: run on 1st, 2nd, 3rd, 4th, 5th π§-d *β star: run every day β-d /5β repetition: run on 5th, 10th, 15th, 20th, 25th, 30th day π-d 2/5β shifted repetition: run on 7th, 12th, 17th, 22nd, 27th day π
and combinations of those, e.g. -d 1-10,15/5,28 π« she's flexible like that.
the defaults are -d* -m* -w* -D* -W* -H0 -M0 -S0, that is, every midnight π like clockwork, literally.
β οΈ note note note: all patterns need to match β this is contrary tocron(8)where either day of month or day of week matches. so-w5 -d13only runs on Friday the 13th π spooky but correct. no cap.
if snooze receives a SIGALRM signal, the command is immediately executed β‘ like immediate immediate.
π TIMEFILES π
optionally (and honestly, kind of optionally-iconically), you can keep track of runs in time files, using -t ποΈ
- when
-Tis passed, execution will not start earlier than the mtime of timefile plus timewait seconds β²οΈ - when
-Tis not passed,snoozewill start finding the first matching time starting from the mtime of timefile, and taking slack into account π§ (e.g.-H0 -s 1d -t timefilewill start an instant execution when timefile has not been touched today, whereas without-tthis would always wait until next midnight π)
if timefile does not exist, it will be assumed outdated enough to ensure earliest execution π±
π¨ big one, don't skip:snoozedoes not update the timefiles β your job needs to do that! only mtime is looked at, sotouch(1)is good π«Ά
π EXIT STATUS π
the 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, snooze just returns with status 0 π«‘ she's polite like that.
π¦ SEE ALSO π¦
runwhen(1), sleep(1), uschedule(1), cron(8) β¨ go read them, bestie, they're all in the group chat.
πΈ AUTHORS πΈ
Leah Neukirchen <leah@vuxu.org> π«Ά icon behaviour.
π LICENSE π
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 πβ¨
http://creativecommons.org/publicdomain/zero/1.0/
okay that's the whole page, periodt π this Debian build is dated August 26, 2023 and yes she's serving General Commands Manual realness, mwah ππ
π¦ where this page comes from
- alpine 3.24: snooze-doc 0.5.1-r1 Β· CC0-1.0
- nixos 26.05: snooze 0.5.1
- nixpkgs unstable: snooze 0.6
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms