]>
Commit | Line | Data |
---|---|---|
1815bff5 A |
1 | .\" |
2 | .\" Copyright (c) 1993 Christopher G. Demetriou | |
3 | .\" All rights reserved. | |
4 | .\" | |
5 | .\" Redistribution and use in source and binary forms, with or without | |
6 | .\" modification, are permitted provided that the following conditions | |
7 | .\" are met: | |
8 | .\" 1. Redistributions of source code must retain the above copyright | |
9 | .\" notice, this list of conditions and the following disclaimer. | |
10 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
11 | .\" notice, this list of conditions and the following disclaimer in the | |
12 | .\" documentation and/or other materials provided with the distribution. | |
13 | .\" 3. All advertising materials mentioning features or use of this software | |
14 | .\" must display the following acknowledgement: | |
15 | .\" This product includes software developed by Christopher G. Demetriou. | |
16 | .\" 3. The name of the author may not be used to endorse or promote products | |
17 | .\" derived from this software without specific prior written permission | |
18 | .\" | |
19 | .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | |
20 | .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | |
21 | .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | |
22 | .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | |
23 | .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | |
24 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
25 | .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
26 | .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
27 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | |
28 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
29 | .\" | |
20e66415 | 30 | .\" $Id: at.1,v 1.3 2003/06/05 17:13:32 eseidel Exp $ |
1815bff5 A |
31 | .\" |
32 | .Dd December 5, 1993 | |
33 | .Dt "AT" 1 | |
34 | .Os NetBSD 0.9a | |
35 | .Sh NAME | |
36 | .Nm at, batch, atq, atrm | |
37 | .Nd queue, examine, or delete jobs for later execution | |
38 | .\" | |
39 | .Sh SYOPSIS | |
40 | .Nm at | |
41 | .Op Fl q Ar queue | |
42 | .Op Fl f Ar file | |
43 | .Op Fl m | |
44 | .Ar time | |
45 | .Pp | |
46 | .Nm atq | |
47 | .Op Fl q Ar queue | |
48 | .Op Fl v | |
49 | .Pp | |
50 | .Nm atrm | |
51 | .Ar job | |
52 | .Op Ar job ... | |
53 | .Pp | |
54 | .Nm batch | |
55 | .Op Fl f Ar file | |
56 | .Op Fl m | |
57 | .Ar time | |
20e66415 A |
58 | .Sh NOTE |
59 | .Nm at , | |
60 | .Nm batch , | |
61 | .Nm atq , | |
62 | .Nm atrm | |
63 | are all disabled by default on Mac OS X. | |
64 | Each of these commands depend on the execution of | |
65 | .Xr atrun 8 | |
66 | which has been disabled due to power management concerns. | |
67 | Those who would like to use these commands, must first re-enable | |
68 | .Nm /usr/libexec/atrun | |
69 | by removing the leading '#' from the line | |
70 | .Bd -literal | |
71 | #*/5 * * * * root /usr/libexec/atrun | |
72 | .Ed | |
73 | in the file | |
74 | .Pa /etc/crontab . | |
75 | .Pa /etc/crontab | |
76 | must be edited by root. | |
1815bff5 A |
77 | .Sh DESCRIPTION |
78 | The | |
79 | .Nm at | |
80 | and | |
81 | .Nm batch | |
82 | utilities read commands from the standard input or a specified file | |
83 | which are to be executed at a later time, using | |
84 | .Xr sh 1 . | |
85 | .Pp | |
86 | The functions of the commands are as follows: | |
87 | .Bl -tag -width indent | |
88 | .It Nm at | |
89 | Executes commands at a specified time. | |
90 | .It Nm atq | |
91 | Lists the user's pending jobs, unless the user is | |
92 | the superuser. In that case, everybody's jobs are | |
93 | listed. | |
94 | .It Nm atrm | |
95 | Deletes jobs. | |
96 | .It Nm batch | |
20e66415 A |
97 | Executes commands when system load levels drop below a user-specifed threshold. |
98 | The load threshold for batch jobs is specifed | |
99 | as an argument when executing | |
100 | .Xr atrun 8 . | |
1815bff5 A |
101 | .El |
102 | .Pp | |
103 | For both | |
104 | .Nm at | |
105 | and | |
106 | .Nm batch , | |
107 | the working directory, environment (except for the variables | |
108 | .Nm TERM , | |
109 | .Nm TERMCAP , | |
110 | .Nm DISPLAY , | |
111 | and | |
112 | .Nm _ ) | |
113 | and the umask are retained from the time of invocation. The user | |
114 | will be mailed the standard output and standard error from | |
115 | his commands if any output is generated. If | |
116 | .Nm at | |
117 | is executed from a | |
118 | .Xr su 1 | |
119 | shell, the owner of the login shell will receive the mail. | |
120 | .Sh OPTIONS | |
121 | .Bl -tag -width indent | |
122 | The available options are as follows: | |
123 | .It Fl q Ar queue | |
124 | Use the specified queue. A queue designation consists | |
125 | of a single letter; valid queue designation range from | |
126 | .Ar a | |
127 | to | |
128 | .Ar l . | |
129 | The | |
130 | .Ar a | |
131 | queue is the default, and | |
132 | .Ar b | |
133 | is the batch queue. Queues with higher letters run with | |
134 | increased niceness. If | |
135 | .Nm atq | |
136 | is given a specific queue, it will only show jobs pending | |
137 | in that queue. | |
138 | .It Fl m | |
139 | Send mail to the user when the job has completed, even if | |
140 | there was no output. | |
141 | .It Fl f Ar file | |
142 | Reads the job from | |
143 | .Ar file | |
144 | rather than the standard input. | |
145 | .It Fl v | |
146 | Shows completed but not yet deleted jobs in the queue. | |
20e66415 | 147 | .El |
1815bff5 A |
148 | .Sh TIME SPECIFICATION |
149 | .Nm At | |
150 | allows some moderately complex time specifications. | |
151 | It accepts times of the form | |
152 | .Ar HHMM | |
153 | or | |
154 | .Ar HH:MM | |
155 | to run a job at a specific time of day. If | |
156 | that time is already passed, the next day is assumed. | |
157 | You may also specify | |
158 | .Nm midnight , | |
159 | .Nm noon , | |
160 | or | |
161 | .Nm teatime | |
162 | (4PM) and you can give a time of day suffixed with | |
163 | .Nm AM | |
164 | or | |
165 | .Nm PM | |
166 | for running in the morning or the evening. You can | |
167 | also specify the date on which the job will be run | |
168 | by giving a date in the form | |
169 | .Ar month-name day | |
170 | with an optional | |
171 | .Ar year , | |
172 | or giving a date of the form | |
173 | .Ar MMDDYY , | |
174 | .Ar MM/DD/YY | |
175 | or | |
176 | .Ar DD.MM.YY . | |
177 | You can also give times like | |
178 | .Nm now + | |
179 | .Ar count time-units , | |
180 | where the time units can be | |
181 | .Nm minutes, hours, days, | |
182 | or | |
183 | .Nm weeks | |
184 | You can suffix the time with | |
185 | .Nm today | |
186 | to run the job today, or | |
187 | .Nm tomorrow | |
188 | to run the job tomorrow. | |
189 | .Pp | |
190 | For example, to run a job at 4PM three days from now, you | |
191 | would specify a time of | |
192 | .Nm 4PM + 3 days . | |
193 | To run a job at 10:00AM on on July 31, you would specify | |
194 | a time of | |
195 | .Nm 10AM Jul 31 . | |
196 | Finally, to run a job at 1AM tomorrow, you would specify | |
197 | a time of | |
198 | .Nm 1AM tomorrow . | |
199 | .Sh FILES | |
200 | .Bl -tag -width /var/at/lockfile -compact | |
201 | .It Pa /var/at/jobs | |
202 | Directory containing job files | |
203 | .It Pa /var/at/spool | |
204 | Directory containing output spool files | |
205 | .It Pa /var/at/lockfile | |
206 | Job-creation lock file. | |
207 | .It Pa /var/run/utmp | |
208 | .El | |
209 | .Sh SEE ALSO | |
210 | .Xr crond 8 , | |
211 | .Xr nice 1 , | |
212 | .Xr sh 1 , | |
213 | .Xr atrun 8 | |
214 | .Sh AUTHOR | |
215 | .Bl -tag | |
216 | Thomas Koenig, ig25@rz.uni-karlsruhe.de | |
217 | .El | |
218 | .Sh BUGS | |
219 | Traditional access control to | |
220 | .Nm at | |
221 | and | |
222 | .Nm batch | |
223 | via the files | |
224 | .Pa /var/at/at.allow | |
225 | and | |
226 | .Pa /var/at/at.deny | |
227 | is not implemented. | |
228 | .Pp | |
229 | If the file | |
230 | .Pa /var/run/utmp | |
231 | is not available or corrupted, or if the user is not | |
232 | logged in at the time | |
233 | .Nm at | |
234 | is invoked, the mail is sent to the userid found in the | |
235 | environment variable | |
236 | .Nm LOGNAME . | |
237 | If that is undefined or empty, the current userid is assumed. |