What Is the at Command?
While cron handles recurring scheduled tasks, the at command lets you schedule a one-time task to run at a specific future time on your Breeze. It is perfect for deferred maintenance, delayed restarts, or timed backups.
Installing at
The at daemon may not be installed by default:
sudo apt update
sudo apt install -y at
sudo systemctl enable --now atdScheduling a Task
Use at followed by a time specification. Type your commands, then press Ctrl+D:
# Run at a specific time today
at 14:30
systemctl restart nginx
<Ctrl+D>
# Run at a specific date and time
at 10:00 AM March 5
/root/scripts/run-backup.sh
<Ctrl+D>
# Run after a delay
at now + 30 minutes
echo "Reminder: check deployment" | mail -s "Reminder" admin@example.com
<Ctrl+D>Time Specifications
The at command accepts flexible time formats:
at 3:00 PM-- specific time today (or tomorrow if past)at midnight-- midnight tonightat noon tomorrow-- noon the next dayat now + 2 hours-- relative time from nowat now + 1 week-- one week from nowat 09:00 2026-03-15-- specific date and time
Managing Scheduled Jobs
# List pending jobs
atq
# View a specific job's commands
at -c 5
# Remove a pending job
atrm 5Using at with Scripts
Pipe a script file into at for complex tasks:
at 2:00 AM < /root/scripts/maintenance.shPractical Uses
- Schedule a server reboot during off-peak hours
- Delay a deployment until a maintenance window
- Send a reminder email after a set interval
- Run a one-time database migration at a specific time