Vance says: Good points
RE: hpr4637::2026-05-12 UNIX Curio #6 - at and batch by Vance00:11:06 Listen in
ogg,
opus,
or
mp3 format.
Nice to hear that others find "at" to be helpful! Perhaps some of these curios are not as obscure as I thought.
To delay running something on a personal system, I would probably be more likely to use "sleep [time] ; [command]" as a quick-and-dirty method. This would also put the output in the same terminal session. But I can see how "at" could be more elegant.
For rebooting, a lot of systems have the "shutdown" command (in looking around, it's far more common than I expected). This takes a time argument for when to execute the shutdown. So you could also use "shutdown -r 00:00" as a way to reboot your system at midnight (some implementations might differ on how the time is expressed). As with Perl, in the UNIX world often there's more than one way to do it!
Whiskeyjack says: At and batch in HPR4637
RE: hpr4637::2026-05-12 UNIX Curio #6 - at and batch by Vance00:11:06 Listen in
ogg,
opus,
or
mp3 format.
I happen to have a number of VMs set up that I use for testing, so I was able to do a quick check to see which distros have "at" and "batch" installed by default.
It turns out that Debian, Ubuntu, Raspberry Pi, Suse, and Alpine do not have it by default. Alma (a Red Hat clone), FreeBSD, and OpenBSD do.
While they can be installed later, it may be that they are not more commonly used now because you cannot rely on them being there as a standard feature.
I was struck by the thought that "batch" may be useful for things like testing software by being able to kick off a long series of tests that are run in the background while you get on with doing other things without these background tests affecting whatever else you are doing too much. Audio and video processing may possibly be the same.
Perhaps some other listeners could think up some creative ways of using "at" and "batch" and tell us about it in an episode in future. This sounds like it could lead to some interesting ideas.
candycanearter07 says: still useful!
RE: hpr4637::2026-05-12 UNIX Curio #6 - at and batch by Vance00:11:06 Listen in
ogg,
opus,
or
mp3 format.
IMO, at and batch still have plenty of uses in things like scripts. It does provide a POSIX way to schedule a task in the future, which could be useful for scripts that want to offset certain effects without having to run its own daemon. Something like batch could also be used with cron as a sort of "run at some point after this time" trick, so if you happen to be doing something intensive at that time then it can put it off until its more optimal.
Also, at can just be used to plain run some process a few hours from now, its pretty useful for like starting an intensive process overnight without having to remember to start it before going to bed
norrist says: at for scheduled reboots
RE: hpr4637::2026-05-12 UNIX Curio #6 - at and batch by Vance00:11:06 Listen in
ogg,
opus,
or
mp3 format.
I use at to schedule reboots for systems that have kernel updates installed, but I dont want to reboot right now.
Something like:
@midnight ENTER
reboot ENTER
CRTL-d