1AT(1) Linux Programmer's Manual AT(1)
2
3
4
6 at, batch, atq, atrm - queue, examine or delete jobs for later execu‐
7 tion
8
10 at [-V] [-q queue] [-f file] [-mldbv] TIME
11 at [-V] [-q queue] [-f file] [-mldbv] -t time_arg
12 at -c job [job...]
13 atq [-V] [-q queue]
14 atrm [-V] job [job...]
15 batch
16
18 at and batch read commands from standard input or a specified file
19 which are to be executed at a later time.
20
21 at executes commands at a specified time.
22
23 atq lists the user's pending jobs, unless the user is the supe‐
24 ruser; in that case, everybody's jobs are listed. The format
25 of the output lines (one for each job) is: Job number, date,
26 hour, queue, and username.
27
28 atrm deletes jobs, identified by their job number.
29
30 batch executes commands when system load levels permit; in other
31 words, when the load average drops below 0.8, or the value
32 specified in the invocation of atd.
33
34 At allows fairly complex time specifications, extending the POSIX.2
35 standard. It accepts times of the form HH:MM to run a job at a spe‐
36 cific time of day. (If that time is already past, the next day is
37 assumed.) You may also specify midnight, noon, or teatime (4pm) and
38 you can have a time-of-day suffixed with AM or PM for running in the
39 morning or the evening. You can also say what day the job will be run,
40 by giving a date in the form month-name day with an optional year, or
41 giving a date of the form MMDDYY or MM/DD/YY or DD.MM.YY. The specifi‐
42 cation of a date must follow the specification of the time of day. You
43 can also give times like now + count time-units, where the time-units
44 can be minutes, hours, days, or weeks and you can tell at to run the
45 job today by suffixing the time with today and to run the job tomorrow
46 by suffixing the time with tomorrow.
47
48 For example, to run a job at 4pm three days from now, you would do at
49 4pm + 3 days, to run a job at 10:00am on July 31, you would do at 10am
50 Jul 31 and to run a job at 1am tomorrow, you would do at 1am tomorrow.
51
52 The exact definition of the time specification can be found in
53 /usr/share/doc/at-3.1.9/timespec.
54
55 For both at and batch, commands are read from standard input or the
56 file specified with the -f option and executed. The working directory,
57 the environment (except for the variables TERM, DISPLAY and _) and the
58 umask are retained from the time of invocation. An at - or batch -
59 command invoked from a su(1) shell will retain the current userid. The
60 user will be mailed standard error and standard output from his com‐
61 mands, if any. Mail will be sent using the command /usr/sbin/sendmail.
62 If at is executed from a su(1) shell, the owner of the login shell will
63 receive the mail.
64
65 The superuser may use these commands in any case. For other users,
66 permission to use at is determined by the files /etc/at.allow and
67 /etc/at.deny.
68
69 If the file /etc/at.allow exists, only usernames mentioned in it are
70 allowed to use at.
71
72 If /etc/at.allow does not exist, /etc/at.deny is checked, every user‐
73 name not mentioned in it is then allowed to use at.
74
75 If neither exists, only the superuser is allowed use of at.
76
77 An empty /etc/at.deny means that every user is allowed use these com‐
78 mands, this is the default configuration.
79
81 -V prints the version number to standard error.
82
83 -q queue
84 uses the specified queue. A queue designation consists of a
85 single letter; valid queue designations range from a to z. and
86 A to Z. The a queue is the default for at and the b queue for
87 batch. Queues with higher letters run with increased niceness.
88 The special queue "=" is reserved for jobs which are currently
89 running.
90
91 If a job is submitted to a queue designated with an uppercase letter,
92 the job is treated as if it were submitted to batch at the time of the
93 job. Once the time is reached, the batch processing rules with respect
94 to load average apply. If atq is given a specific queue, it will only
95 show jobs pending in that queue.
96
97 -m Send mail to the user when the job has completed even if there
98 was no output.
99
100 -f file Reads the job from file rather than standard input.
101
102 -l Is an alias for atq.
103
104 -d Is an alias for atrm.
105
106
107 -v Shows the time the job will be executed before reading
108 the job.
109
110 Times displayed will be in the format "Thu Feb 20 14:50:00
111 1997".
112
113 -c cats the jobs listed on the command line to standard out‐
114 put.
115
116 -t time_arg
117 Submit the job to be run at the time specified by the
118 time_arg option argument, which must have the same format
119 as specified for the touch(1) utility's -t time option
120 argument ([[CC]YY]MMDDhhmm).
121
123 SHELL The value of the SHELL environment variable at the time
124 of at invocation will determine which shell is used to
125 execute the at job commands. If SHELL is unset when at
126 is invoked, the user's login shell will be used; other‐
127 wise, if SHELL is set when at is invoked, it must con‐
128 tain the path of a shell interpreter executable that
129 will be used to run the commands at the specified time.
130
131 at will record the values of environment variables present at
132 time of at invocation. When the commands are run at the speci‐
133 fied time, at will restore these variables to their recorded
134 values . These variables are excluded from this processing and
135 are never set by at when the commands are run :
136 TERM, DISPLAY, SHELLOPTS, _, PPID, BASH_VERSINFO, EUID, UID,
137 GROUPS.
138 If the user submitting the at job is not the super-user, vari‐
139 ables that alter the behaviour of the loader ld.so(8), such as
140 LD_LIBRARY_PATH , cannot be recorded and restored by at .
141
143 /var/spool/at
144 /var/spool/at/spool
145 /proc/loadavg
146 /var/run/utmp
147 /etc/at.allow
148 /etc/at.deny
149
151 cron(1), nice(1), sh(1), umask(2), atd(8).
152
154 The correct operation of batch for Linux depends on the presence
155 of a proc- type directory mounted on /proc.
156
157 If the file /var/run/utmp is not available or corrupted, or if
158 the user is not logged on at the time at is invoked, the mail is
159 sent to the userid found in the environment variable LOGNAME.
160 If that is undefined or empty, the current userid is assumed.
161
162 At and batch as presently implemented are not suitable when
163 users are competing for resources. If this is the case for your
164 site, you might want to consider another batch system, such as
165 nqs.
166
168 At was mostly written by Thomas Koenig, ig25@rz.uni-karls‐
169 ruhe.de.
170
171
172
173local Nov 1996 AT(1)