Debian Codegraph @

upstream/debian-unstable/man1/at.1

raw
1 .TH AT 1 2009-11-14
2 .SH NAME
3 at, batch, atq, atrm \- queue, examine, or delete jobs for later execution
4 .SH SYNOPSIS
5 .B at
6 .RB [ \-V ]
7 .RB [ \-q
8 .IR queue ]
9 .RB [ \-f
10 .IR file ]
11 .RB [ \-u
12 .IR username ]
13 .RB [ \-mMlv ]
14 .IR timespec " ...\&"
15 .br
16 .B at
17 .RB [ \-V ]
18 .RB [ \-q
19 .IR queue ]
20 .RB [ \-f
21 .IR file ]
22 .RB [ \-u
23 .IR username ]
24 .RB [ \-mMkv ]
25 .RB [ \-t
26 .IR time ]
27 .br
28 .B "at \-c"
29 .I job
30 [...\&]
31 .br
32 .B at
33 .RB [ \-V ]
34 .RB \-l
35 .RB [ -o
36 .IR timeformat ]
37 .I [job
38 .IR ... ]
39 .br
40 .B atq
41 .RB [ \-V ]
42 .RB [ \-q
43 .IR queue ]
44 .RB [ -o
45 .IR timeformat ]
46 .I [job
47 .IR ... ]
48 .br
49 .B at
50 .RB [ \-rd ]
51 .I job
52 [...\&]
53 .br
54 .B atrm
55 .RB [ \-V ]
56 .I job
57 [...\&]
58 .br
59 .B batch
60 .br
61 .B "at \-b"
62 .SH DESCRIPTION
63 .B at
64 and
65 .B batch
66 read commands from standard input or a specified file which are to
67 be executed at a later time, using
68 .BR /bin/sh .
69 .TP 8
70 .B at
71 executes commands at a specified time.
72 .TP 8
73 .B atq
74 lists the user's pending jobs, unless the user is the superuser; in that
75 case, everybody's jobs are listed. The format of the output lines (one
76 for each job) is: Job number, date, hour, queue, and username.
77 .TP 8
78 .B atrm
79 deletes jobs, identified by their job number.
80 .TP 8
81 .B batch
82 executes commands when system load levels permit; in other words, when the load average
83 drops below 1.5, or the value specified in the invocation of
84 .BR atd .
85 .PP
86 .B At
87 allows fairly complex time
88 specifications, extending the POSIX.2 standard. It accepts times
89 of the form
90 .B HH:MM
91 to run a job at a specific time of day.
92 (If that time is already past, the next day is assumed.)
93 You may also specify
94 .B midnight,
95 .B noon,
96 or
97 .B teatime
98 (4pm)
99 and you can have a time-of-day suffixed with
100 .B AM
101 or
102 .B PM
103 for running in the morning or the evening.
104 You can also say what day the job will be run,
105 by giving a date in the form
106 .B month-name
107 .B day
108 with an optional
109 .B year,
110 or giving a date of the form
111 .IR MMDD [ CC ] YY ,
112 .IR MM / DD /[ CC ] YY ,
113 .IR DD . MM .[ CC ] YY
114 or
115 .RI [ CC ] YY - MM - DD .
116 The specification of a date
117 .I must
118 follow the specification of the time of day.
119 You can also give times like
120 .B now
121 .B +
122 .I count
123 .I time-units,
124 where the time-units can be
125 .B minutes,
126 .B hours,
127 .B days,
128 or
129 .B weeks
130 and you can tell
131 .B at
132 to run the job today by suffixing the time with
133 .B today
134 and to run the job tomorrow by suffixing the time with
135 .B tomorrow.
136 .PP
137 For example, to run a job at 4pm three days from now, you would do
138 .B at 4pm + 3 days,
139 to run a job at 10:00am on July 31, you would do
140 .B at 10am Jul 31
141 and to run a job at 1am tomorrow, you would do
142 .B at 1am tomorrow.
143 .PP
144 If you specify a job to absolutely run at a specific time and date in
145 the past, the job will run as soon as possible. For example, if it is
146 8pm and you do a
147 .B at 6pm today,
148 it will run more likely at 8:05pm.
149 .PP
150 The definition of the time specification can be found in
151 .IR /usr/share/doc/at/timespec .
152 .PP
153 For both
154 .BR at " and " batch ,
155 commands are read from standard input or the file specified
156 with the
157 .B \-f
158 option and executed.
159 The working directory, the environment (except for the variables
160 .BR BASH_VERSINFO ,
161 .BR DISPLAY ,
162 .BR EUID ,
163 .BR GROUPS ,
164 .BR SHELLOPTS ,
165 .BR TERM ,
166 .BR UID ,
167 and
168 .BR _ )
169 and the umask are retained from the time of invocation.
170
171 As
172 .B at
173 is currently implemented as a setuid program, other environment variables (e.g.,
174 .BR LD_LIBRARY_PATH " or " LD_PRELOAD )
175 are also not exported. This may change in the future. As a workaround,
176 set these variables explicitly in your job.
177
178 An
179 .BR "at " \-
180 or
181 .BR "batch "\-
182 command invoked from a
183 .BR su (1)
184 shell will retain the current userid.
185 The user will be mailed standard error and standard output from his
186 commands, if any.
187 Mail will be sent using the command
188 .BR /usr/sbin/sendmail .
189 If
190 .B at
191 is executed from a
192 .BR su (1)
193 shell, the owner of the login shell will receive the mail.
194 .PP
195 The superuser may use these commands in any case.
196 For other users, permission to use at is determined by the files
197 .I /etc/at.allow
198 and
199 .IR /etc/at.deny .
200 See
201 .BR at.allow (5)
202 for details.
203 .SH OPTIONS
204 .TP 8
205 .B \-V
206 prints the version number to standard error and exit successfully.
207 .TP 8
208 .BI \-q " queue"
209 uses the specified queue.
210 A queue designation consists of a single letter; valid queue designations
211 range from
212 .B a
213 to
214 .B z
215 and
216 .B A
217 to
218 .BR Z .
219 The
220 .B a
221 queue is the default for
222 .B at
223 and the
224 .B b
225 queue for
226 .BR batch .
227 Queues with higher letters run with increased niceness. The special
228 queue "=" is reserved for jobs which are currently running.
229 .P
230 If a job is submitted to a queue designated with an uppercase letter, the
231 job is treated as if it were submitted to batch at the time of the job.
232 Once the time is reached, the batch processing rules with respect to load
233 average apply.
234 If
235 .B atq
236 is given a specific queue, it will only show jobs pending in that queue.
237 .TP 8
238 .B \-m
239 Send mail to the user when the job has completed even if there was no
240 output.
241 .TP 8
242 .B \-M
243 Never send mail to the user.
244 .TP 8
245 .BI \-u " username"
246 Sends mail to
247 .I username
248 rather than the current user.
249 .TP 8
250 .BI \-f " file"
251 Reads the job from
252 .I file
253 rather than standard input.
254 .TP 8
255 .BI \-t " time"
256 run the job at
257 .IR time ,
258 given in the format [[CC]YY]MMDDhhmm[.ss]
259 .TP 8
260 .B \-l
261 Is an alias for
262 .B atq.
263 .TP
264 .B \-r
265 Is an alias for
266 .B atrm.
267 .TP
268 .B \-d
269 Is an alias for
270 .B atrm.
271 .TP
272 .B \-b
273 is an alias for
274 .BR batch .
275 .TP
276 .B \-v
277 Shows the time the job will be executed before reading the job.
278 .P
279 Times displayed will be in the format "Thu Feb 20 14:50:00 1997".
280 .TP
281 .B
282 \-c
283 cats the jobs listed on the command line to standard output.
284 .TP 8
285 .BI \-o " fmt"
286 strftime-like time format used for the job list
287 .SH FILES
288 .I /var/spool/cron/atjobs
289 .br
290 .I /var/spool/cron/atspool
291 .br
292 .I /proc/loadavg
293 .br
294 .I /var/run/utmp
295 .br
296 .I /etc/at.allow
297 .br
298 .I /etc/at.deny
299 .SH SEE ALSO
300 .BR at.allow (5),
301 .BR at.deny (5),
302 .BR atd (8),
303 .BR cron (1),
304 .BR nice (1),
305 .BR sh (1),
306 .BR umask (2).
307 .SH BUGS
308 The correct operation of
309 .B batch
310 for Linux depends on the presence of a
311 .IR proc -
312 type directory mounted on
313 .IR /proc .
314 .PP
315 If the file
316 .I /var/run/utmp
317 is not available or corrupted, or if the user is not logged on at the
318 time
319 .B at
320 is invoked, the mail is sent to the userid found
321 in the environment variable
322 .BR LOGNAME .
323 If that is undefined or empty, the current userid is assumed.
324 .PP
325 .B At
326 and
327 .B batch
328 as presently implemented are not suitable when users are competing for
329 resources.
330 If this is the case for your site, you might want to consider another
331 batch system, such as
332 .BR nqs .
333 .SH AUTHOR
334 At was mostly written by Thomas Koenig.