← Cron & Scheduling
Linux · Cron & Scheduling

How to schedule a one-off task with at in Linux

Run a command once at a future time with at, list the queue with atq, and cancel a job with atrm.


Schedule a command to run once at a specific time with at. The queue is managed with atq and atrm.

at runs the job once, in a minimal environment like cron, so use absolute paths. The atd service must be running (systemctl status atd) or the job will never fire.

# Schedule interactively (type commands, end with Ctrl-D)
at 22:00

# Or pipe a command in
echo '/opt/scripts/report.sh' | at now + 1 hour

# Common time forms: 'now + 30 minutes', '2pm tomorrow', '10:00 Aug 20'

# List the queue
atq

# Remove a job by its id
atrm <id>
LinuxatScheduling