at—at, atq, atrmbatch—execute commands at a later time

at [-V] [-q queue] [-f file] [-mldbv] TIME
at -c job [job…]
atq [-V] [-q queue] [-v]
atrm [-V] job [job…]
batch [-V] [-q queue] [-f file] [-mv] [TIME]

at and batch read commands from standard input to be executed at a later time. at allows you to specify when the commands should be executed, while jobs queued with batch will execute when system load level permits. Executes commands read from stdin or a file at some later time. Unless redirected, the output is mailed to the user.

atq lists the user's pending jobs, unless the user is the superuser; in that case, everybody's jobs are listed. Same as at -l.

atrm deletes jobs. atrm 3 4 5 same as at -d.

Example A.3.
1  $ at 6:30am Dec 12 < program
					warning: commands will be executed using /bin/sh
					job 2 at 1999-12-12 06:30
2  $ at teatime today < program
					warning: commands will be executed using /bin/sh
					job 4 at 1999-10-20 16:00
3  $ at 7:45 pm August 9 < program
					warning: commands will be executed using /bin/sh
					job 5 at 1999-08-09 19:45
4  $ at now + 3 hours < program
					warning: commands will be executed using /bin/sh
					job 9 at 1999-10-20 23:18
5  $ at 2am tomorrow
					at> man bash | lpr
					at> <EOT>
					warning: commands will be executed using /bin/sh
					job 7 at 1999-10-19 02:00
6  $ atq
					6       1999-10-19 12:00 a
					7       1999-10-19 02:00 a
7  $at -f file 17:05 monday
					warning: commands will be executed using /bin/sh
					job 9 at 1999-10-18 17:05
				

Explanation

  1. At 6:30 in the morning on December 12th, start the job.The warning message appears after each command.

  2. At 4:00 this afternoon, start the job.

  3. At 7:45 in the evening on August 9th, start the job.

  4. In three hours start the job.

  5. At 2 am tomorrow morning, execute the following commands. at> is the at prompt. Use Control-D to exit.

  6. atq lists users' jobs currently pending.

  7. Following the -f option is a filename. This file contains the program that will be executed at 7:05 on Monday.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.142.85