Schedule single-run commands fast from the shell. 16.11.2025 | reading time: 3 min Need a command to run just once at a specific moment? The `at` tool queues one-off jobs from the shell so you do not have to create a cron entry for a temporary task. Quick practical example Try this on a shell: schedule a simple file append for one minute from now, then inspect and clean up; type the commands and press Ctrl-D to finish the at job input: ```bash $ at now + 1 minute at> echo 'Backup completed' >> /tmp/backup.log at> <Ctrl-D> job 1 at Mon Nov 16 10:05:00 2025 ``` Check the queue and job contents: ```bash $ atq 1 Mon Nov 16 10:05:00 2025 $ at -c 1 # printed job script echo 'Backup completed' >> /tmp/backup.log ``` Remove the job if needed and verify the run: ```bash $ atrm 1 $ tail -n1 /tmp/backup.log Backup completed ``` Behavior and gotchas The `at` scheduler runs jobs with the user identity that queued them and with the environment saved at queue time, so export needed variables or use full paths; system-wide restrictions live in `at.allow` and `at.deny`; the `atd` service must be running for jobs to execute; use clear time formats like "now + 5 minutes", "HH:MM YYYY-MM-DD" or keywords such as "midnight" and "tomorrow"; job stdout and stderr are mailed to the user unless redirected, and you can inspect a stored job with `at -c jobnumber`. Related tools and when to pick them Use `at` for single, ad-hoc runs; choose cron for recurring schedules; prefer systemd timers when you need tight integration with units or advanced logging; `batch` is handy for non-urgent jobs that should run at low system load. Practical next steps Start by scheduling a harmless job and watching the queue and output; then try exporting an environment variable into a queued job and note how the job executes; mastering `at` saves time for maintenance and deployment tasks, and it pairs well with scripting for automation. Join Bits & Bytes Academy First class LINUX exam preparation. utilities processes scripting