Tuesday, January 17, 2012

Schedule commands in Linux - at command

'at' command is used to schedule commands to execute on specified time.

1. to schedule:
at -f     [commandfile]  [time]

2.to list scheduled jobs:
at -l
or
atq

3. to cancel scheduled jobs: Use job id listed in atq
atrm [jobid]


All the above commands interacts with the daemon process named 'atd'. atd will manage and executes all jobs scheduled. By default all users are allowed to use 'at'. But it can be restricted by configuring the /etc/at.allow and /etc/at.deny files. Add username per line to restrict/allow usage.

Before using the above command make sure that the atd service is running.

To start atd service
#service atd start

Have fun :-)
Pin It
Related Posts Plugin for WordPress, Blogger...