]> git.saurik.com Git - apple/system_cmds.git/blame - at.tproj/at.1
system_cmds-230.7.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.\"
30.\" $Id: at.1,v 1.1.1.1 1999/05/02 04:21:18 wsanchez Exp $
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
58.Sh DESCRIPTION
59The
60.Nm at
61and
62.Nm batch
63utilities read commands from the standard input or a specified file
64which are to be executed at a later time, using
65.Xr sh 1 .
66.Pp
67The functions of the commands are as follows:
68.Bl -tag -width indent
69.It Nm at
70Executes commands at a specified time.
71.It Nm atq
72Lists the user's pending jobs, unless the user is
73the superuser. In that case, everybody's jobs are
74listed.
75.It Nm atrm
76Deletes jobs.
77.It Nm batch
78executes commands when system load levels permit.
79In other words, it executes the commands when the load
80average drops below a specified level.
81.El
82.Pp
83For both
84.Nm at
85and
86.Nm batch ,
87the working directory, environment (except for the variables
88.Nm TERM ,
89.Nm TERMCAP ,
90.Nm DISPLAY ,
91and
92.Nm _ )
93and the umask are retained from the time of invocation. The user
94will be mailed the standard output and standard error from
95his commands if any output is generated. If
96.Nm at
97is executed from a
98.Xr su 1
99shell, the owner of the login shell will receive the mail.
100.Sh OPTIONS
101.Bl -tag -width indent
102The available options are as follows:
103.It Fl q Ar queue
104Use the specified queue. A queue designation consists
105of a single letter; valid queue designation range from
106.Ar a
107to
108.Ar l .
109The
110.Ar a
111queue is the default, and
112.Ar b
113is the batch queue. Queues with higher letters run with
114increased niceness. If
115.Nm atq
116is given a specific queue, it will only show jobs pending
117in that queue.
118.It Fl m
119Send mail to the user when the job has completed, even if
120there was no output.
121.It Fl f Ar file
122Reads the job from
123.Ar file
124rather than the standard input.
125.It Fl v
126Shows completed but not yet deleted jobs in the queue.
127.Sh TIME SPECIFICATION
128.Nm At
129allows some moderately complex time specifications.
130It accepts times of the form
131.Ar HHMM
132or
133.Ar HH:MM
134to run a job at a specific time of day. If
135that time is already passed, the next day is assumed.
136You may also specify
137.Nm midnight ,
138.Nm noon ,
139or
140.Nm teatime
141(4PM) and you can give a time of day suffixed with
142.Nm AM
143or
144.Nm PM
145for running in the morning or the evening. You can
146also specify the date on which the job will be run
147by giving a date in the form
148.Ar month-name day
149with an optional
150.Ar year ,
151or giving a date of the form
152.Ar MMDDYY ,
153.Ar MM/DD/YY
154or
155.Ar DD.MM.YY .
156You can also give times like
157.Nm now +
158.Ar count time-units ,
159where the time units can be
160.Nm minutes, hours, days,
161or
162.Nm weeks
163You can suffix the time with
164.Nm today
165to run the job today, or
166.Nm tomorrow
167to run the job tomorrow.
168.Pp
169For example, to run a job at 4PM three days from now, you
170would specify a time of
171.Nm 4PM + 3 days .
172To run a job at 10:00AM on on July 31, you would specify
173a time of
174.Nm 10AM Jul 31 .
175Finally, to run a job at 1AM tomorrow, you would specify
176a time of
177.Nm 1AM tomorrow .
178.Sh FILES
179.Bl -tag -width /var/at/lockfile -compact
180.It Pa /var/at/jobs
181Directory containing job files
182.It Pa /var/at/spool
183Directory containing output spool files
184.It Pa /var/at/lockfile
185Job-creation lock file.
186.It Pa /var/run/utmp
187.El
188.Sh SEE ALSO
189.Xr crond 8 ,
190.Xr nice 1 ,
191.Xr sh 1 ,
192.Xr atrun 8
193.Sh AUTHOR
194.Bl -tag
195Thomas Koenig, ig25@rz.uni-karlsruhe.de
196.El
197.Sh BUGS
198Traditional access control to
199.Nm at
200and
201.Nm batch
202via the files
203.Pa /var/at/at.allow
204and
205.Pa /var/at/at.deny
206is not implemented.
207.Pp
208If the file
209.Pa /var/run/utmp
210is not available or corrupted, or if the user is not
211logged in at the time
212.Nm at
213is invoked, the mail is sent to the userid found in the
214environment variable
215.Nm LOGNAME .
216If that is undefined or empty, the current userid is assumed.