1 2 3 4 5 6 7 8 9 10 |
$ at time date $ at 11 am may 20 # at 02:00 AM Fri at> yum update glibc at> echo "Executing scheduled task" | logger at> shutdown -r +5 "Server is going to be rebooted in 5 minutes for scheduled task. Please save your work ASAP." at> <EOT> job 2 at 2015-02-06 02:00 |
Ends using CTRL+D that generates the <EOT> bit.
Source: http://www.computerhope.com/unix/uat.htm
Check the processes in the queue
1 |
atq |
Check content of a job
1 |
at -c <job number> |
Delete job
1 |
atrm <job number> |
Also, you can cat/modify the job in /var/spool/cron/atjobs/ or /var/spool/at (in Centos)
If not installed, on Centos, make sure to start also ‘atd‘ service.
1 |
# chkconfig atd on && service atd start |