]> git.saurik.com Git - apple/system_cmds.git/blame - at.tproj/at.1
system_cmds-258.tar.gz
[apple/system_cmds.git] / at.tproj / at.1
CommitLineData
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
63are all disabled by default on Mac OS X.
64Each of these commands depend on the execution of
65.Xr atrun 8
66which has been disabled due to power management concerns.
67Those who would like to use these commands, must first re-enable
68.Nm /usr/libexec/atrun
69by removing the leading '#' from the line
70.Bd -literal
71#*/5 * * * * root /usr/libexec/atrun
72.Ed
73in the file
74.Pa /etc/crontab .
75.Pa /etc/crontab
76must be edited by root.
1815bff5
A
77.Sh DESCRIPTION
78The
79.Nm at
80and
81.Nm batch
82utilities read commands from the standard input or a specified file
83which are to be executed at a later time, using
84.Xr sh 1 .
85.Pp
86The functions of the commands are as follows:
87.Bl -tag -width indent
88.It Nm at
89Executes commands at a specified time.
90.It Nm atq
91Lists the user's pending jobs, unless the user is
92the superuser. In that case, everybody's jobs are
93listed.
94.It Nm atrm
95Deletes jobs.
96.It Nm batch
20e66415
A
97Executes commands when system load levels drop below a user-specifed threshold.
98The load threshold for batch jobs is specifed
99as an argument when executing
100.Xr atrun 8 .
1815bff5
A
101.El
102.Pp
103For both
104.Nm at
105and
106.Nm batch ,
107the working directory, environment (except for the variables
108.Nm TERM ,
109.Nm TERMCAP ,
110.Nm DISPLAY ,
111and
112.Nm _ )
113and the umask are retained from the time of invocation. The user
114will be mailed the standard output and standard error from
115his commands if any output is generated. If
116.Nm at
117is executed from a
118.Xr su 1
119shell, the owner of the login shell will receive the mail.
120.Sh OPTIONS
121.Bl -tag -width indent
122The available options are as follows:
123.It Fl q Ar queue
124Use the specified queue. A queue designation consists
125of a single letter; valid queue designation range from
126.Ar a
127to
128.Ar l .
129The
130.Ar a
131queue is the default, and
132.Ar b
133is the batch queue. Queues with higher letters run with
134increased niceness. If
135.Nm atq
136is given a specific queue, it will only show jobs pending
137in that queue.
138.It Fl m
139Send mail to the user when the job has completed, even if
140there was no output.
141.It Fl f Ar file
142Reads the job from
143.Ar file
144rather than the standard input.
145.It Fl v
146Shows completed but not yet deleted jobs in the queue.
20e66415 147.El
1815bff5
A
148.Sh TIME SPECIFICATION
149.Nm At
150allows some moderately complex time specifications.
151It accepts times of the form
152.Ar HHMM
153or
154.Ar HH:MM
155to run a job at a specific time of day. If
156that time is already passed, the next day is assumed.
157You may also specify
158.Nm midnight ,
159.Nm noon ,
160or
161.Nm teatime
162(4PM) and you can give a time of day suffixed with
163.Nm AM
164or
165.Nm PM
166for running in the morning or the evening. You can
167also specify the date on which the job will be run
168by giving a date in the form
169.Ar month-name day
170with an optional
171.Ar year ,
172or giving a date of the form
173.Ar MMDDYY ,
174.Ar MM/DD/YY
175or
176.Ar DD.MM.YY .
177You can also give times like
178.Nm now +
179.Ar count time-units ,
180where the time units can be
181.Nm minutes, hours, days,
182or
183.Nm weeks
184You can suffix the time with
185.Nm today
186to run the job today, or
187.Nm tomorrow
188to run the job tomorrow.
189.Pp
190For example, to run a job at 4PM three days from now, you
191would specify a time of
192.Nm 4PM + 3 days .
193To run a job at 10:00AM on on July 31, you would specify
194a time of
195.Nm 10AM Jul 31 .
196Finally, to run a job at 1AM tomorrow, you would specify
197a time of
198.Nm 1AM tomorrow .
199.Sh FILES
200.Bl -tag -width /var/at/lockfile -compact
201.It Pa /var/at/jobs
202Directory containing job files
203.It Pa /var/at/spool
204Directory containing output spool files
205.It Pa /var/at/lockfile
206Job-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
216Thomas Koenig, ig25@rz.uni-karlsruhe.de
217.El
218.Sh BUGS
219Traditional access control to
220.Nm at
221and
222.Nm batch
223via the files
224.Pa /var/at/at.allow
225and
226.Pa /var/at/at.deny
227is not implemented.
228.Pp
229If the file
230.Pa /var/run/utmp
231is not available or corrupted, or if the user is not
232logged in at the time
233.Nm at
234is invoked, the mail is sent to the userid found in the
235environment variable
236.Nm LOGNAME .
237If that is undefined or empty, the current userid is assumed.