at / atq / atrm
Overview
at schedules one-shot jobs for a later time. Recurring work belongs in cron or systemd timers. Requires the atd daemon.
Syntax
at [options] TIME
at -f script TIME
atq
atrm id...
batchTime expressions
Examples: now + 5 minutes, 23:30, midnight, noon tomorrow, 4pm + 2 days, teatime.
Examples with Explanations
Interactive
at now + 10 minutes
# type commands, finish with Ctrl-DFrom pipe / file
echo '/usr/local/bin/backup.sh >> /var/log/backup.at.log 2>&1' | at 02:30
at -f ./job.sh midnightQueue management
atq
at -c 3 # show job body
atrm 3Low-load batch queue
echo './heavy.sh' | batchPermissions & service
systemctl status atd
# /etc/at.allow /etc/at.denyOutput
Job stdout/stderr is mailed to the user if a local MTA exists; otherwise redirect inside the job.