Tuesday, 4 March 2014

Job Scheduling with 'at' command in Linux Ubuntu

"at" command takes an argument time on which the job is executed and then displays at $prompt.
example:-

at 17:00
then press enter.

at 5:00 pm
then press enter

at>sh.my.sh
then press enter
In above command it will execute my.sh file at 5 pm.

these above at command will be executed in $ prompt.
Ctrl+d to exit from at prompt.

Note:- The "-f " option is used to take commands from the file and "-m " option is used to send jobs completion report to the specified user.

at -m -17:00
then press enter.

Note:- "at" command also offers may keywords like now,noon,today,midnight,tomorrow and also accepts
+ symbol to act as an operation.

example:-

at now +1 year
then press enter

at 5:00 pm +1day
then press enter

at 5:00 pm December 25,2016
then press enter

at 10 am tomorrow

Note:- The jobs list display with "at -l" command.

"at -r" command is used to remove all the jobs from the list. 

No comments:

Post a Comment