Showing posts with label at command. Show all posts
Showing posts with label at command. Show all posts

Sunday, January 2, 2011

at command

at command executes or edit commands scheduled for a later time


Syntax : 



at [-f filename] [-m] -t time [date] [-l] [-r]




Examples :
at 5pm Tuesday -f commands.txt


In this example the at command will run a job as specified in a commands.txt file on following Tuesday at 5pm 



at -l = This command will list each of the scheduled jobs as seen below.

1072250520.a Wed Dec 24 00:22:00 2003



at -r 1072250520.a = Deletes the job just created.

Options :

-f         Specify the pathname of a file to be used as the source of the at-job, instead of standard input.

 -l        (The letter ell.) Report all jobs scheduled for the invoking user if no at_job_id operands are specified. If  at_job_ids  are  specified, report only information for these jobs. The output shall be written to standard output.

 -m     Send  mail  to  the invoking user after the at-job has run, announcing its completion. Standard output and standard error produced by the
              at-job shall be mailed to the user as well, unless redirected elsewhere. Mail shall be sent even if the job produces no output.



-r          Delete the job  that you have set in the past.

-date  Specifies in what date you wish to run the command job. We can use date in the  format month, date, year. The following formats can also be used.

today - Indicates the current day.
tomorrow - Indicates  the day following the current day.




-t       Specifies at what time you want run the command. hh:mm. am / pm time format or 24-hour time format can be used.

The following time formats can also be used

midnight - Indicates the time 12:00 am (00:00).
noon - Indicates the time 12:00 pm.
now - Indicates the current day and time. Now submit an at-job for immediate execution.