Task Automation using ‘at’ service


Scheduling one-time tasks has never been easier than using ‘at’ service.

Time format of ‘at’:

Few examples and their meaning:

$at 8pm Next upcoming 8pm
$at 20:00 Same as above
$at 9am Sunday Upcoming Sunday, 9 am
$at 5pm December 31 Upcoming 31st December, 5pm
$at 9am January 1 2018 Jobs can be scheduled, for any year in future
$at now +5 minutes Any time with reference to current time, instead of minutes, we can assign, hours, weeks, days, months, years
$at 4pm
$at teatime
These commands have the same effect
$at 12am
$at midnight
These commands have similar effect

To install the required package for ‘at’ service, RHEL-7 it is available by default, or else, use the following command(assuming the machine is a yum client).

The service name is atd, must be running and enabled for next reboot.

Otherwise, use the following command in series:


Press CTRL+D to save the job and exit from ‘at’ prompt.

The location (spool file) is at /var/spool/at/

Meaning of the name of this file: a followed by 4 Zeros, job_id, least bother the rest. Notice the job_id from the atq  command above.

By default, the output is sent to mail of the user who created the job.

Would You Mind Sharing?


Be the first to comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.