Debian Codegraph @

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