X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/1c15e88899094343f75aeba04122cd96a96b428e..ad7871609881e73855d0b04da49b486cd93efca7:/usr/src/usr.bin/at/at/at.1 diff --git a/usr/src/usr.bin/at/at/at.1 b/usr/src/usr.bin/at/at/at.1 index d79593b140..25663ac0dc 100644 --- a/usr/src/usr.bin/at/at/at.1 +++ b/usr/src/usr.bin/at/at/at.1 @@ -1,23 +1,37 @@ -.\" Copyright (c) 1980, 1990 The Regents of the University of California. -.\" All rights reserved. +.\" Copyright (c) 1980, 1990, 1993 +.\" The Regents of the University of California. All rights reserved. .\" -.\" Redistribution and use in source and binary forms are permitted provided -.\" that: (1) source distributions retain this entire copyright notice and -.\" comment, and (2) distributions including binaries display the following -.\" acknowledgement: ``This product includes software developed by the -.\" University of California, Berkeley and its contributors'' in the -.\" documentation or other materials provided with the distribution and in -.\" all advertising materials mentioning features or use of this software. -.\" Neither the name of the University nor the names of its contributors may -.\" be used to endorse or promote products derived from this software without -.\" specific prior written permission. -.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED -.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF -.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. .\" -.\" @(#)at.1 6.4 (Berkeley) 7/24/90 +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. .\" -.Dd July 24, 1990 +.\" @(#)at.1 8.1 (Berkeley) 6/29/93 +.\" +.Dd June 29, 1993 .Dt AT 1 .Os BSD 4 .Sh NAME @@ -26,8 +40,8 @@ .Sh SYNOPSIS .Nm at .Op Fl c -.Op Fl s .Op Fl m +.Op Fl s .Ar time .Op Ar day .Op Ar command_file @@ -49,24 +63,24 @@ and may be examined by the program. .Pp Options available: -.Pp -.Tp Fl c +.Bl -tag -width Ds +.It Fl c .Ar Command_file contains .Xr csh 1 commands. -.Tp Fl s +.It Fl s .Ar Command_file contains .Xr sh 1 commands. -.Tp Fl m +.It Fl m Mail will be sent to the user after the job has been run. If errors occur during execution of the job, then a copy of the error diagnostics will be sent to the user. If no errors occur, then a short message is sent informing the user that no errors occurred. -.Tp +.El .Pp If a .Ar command_file @@ -77,15 +91,14 @@ prompts for commands from standard input until a is typed. .Pp The format of the spool file is as follows: -A four line header that includes the owner of the job, the name of the job, +a four line header that includes the owner of the job, the name of the job, the shell used to run the job, and whether mail will be sent after the job is executed. The header is followed by a .Nm cd command to the current directory and a .Nm umask command to set the modes on any files created by the job. -Then -.Nm at +.Nm At copies all relevant environment variables to the spool file. When the script is run, it uses the user and group ID of the creator of the spool file. @@ -100,17 +113,18 @@ is hour and .Em mm is minutes, or the traditional 12 hour time with qualifying options: -.Df I -.Dp Li am , a +.Pp +.Bl -tag -width "am , a" -offset 12n -compact +.It Li am , a am -.Dp Li pm , p +.It Li pm , p pm -.Dp Li n +.It Li n noon -.Dp Li m +.It Li m midnight -.Dp -.De +.El +.Pp The time can be abbreviated as shown below in EXAMPLES. .Pp A @@ -118,7 +132,7 @@ A of the week may be specified by the first two letters of its name. A week (7 days) may be specified by the argument -.Em week . +.Ar week . If a month name is given, the following argument is expected to be the day (numeric). .Sh ENVIRONMENT @@ -127,29 +141,27 @@ the current environment variable .Ev SHELL is used. .Sh EXAMPLES -.Pp -.Tw Ar -.Tp Li at 10p +.Bl -tag -width Ds +.It Li at 10p Execute at 10pm today, or tomorrow if 10pm has past. Use the shell found in the environment variable .Ev SHELL. -.Tp Li at -c -m 1705 mo +.It Li at -c -m 1705 \&mo Execute at 5:05pm on Monday using .Xr csh 1 and send mail upon completion or termination of the job. -.Tp Li at -s -m 1200n week -Use -.Xr sh 1 , -send mail upon completetion, start at noon o'clock, -one week from today. -.Tp Li at -s 8a apr 1 +.It Li at -s -m 1200n week +Execute at noon one week from today, using +.Xr sh 1 +and send mail upon completetion. +.It Li at -s 8a apr 1 Ideally this would be given late in March. The commands would be run at 8 am on April first, using the .Xr sh 1 . -.Tp +.El .Sh ERRORS Errors must be collected via the .Fl m @@ -157,20 +169,19 @@ option or by redirecting the standard output from inside the .Ar command_file. .Sh FILES -.Dw /var/spool/at/yy.ddd.hhhh.* -.Di L -.Dp Pa /var/spool/at +.Bl -tag -width /var/spool/at/yy.ddd.hhhh.* -compact +.It Pa /var/spool/at spooling area -.Dp Pa /var/spool/at/yy.ddd.hhhh.* +.It Pa /var/spool/at/yy.ddd.hhhh.* job file -.Dp Pa /var/spool/at/past +.It Pa /var/spool/at/past directory where jobs are executed from -.Dp Pa /var/spool/at/lasttimedone +.It Pa /var/spool/at/lasttimedone last time atrun was run -.Dp Pa /var/libexec/atrun +.It Pa /var/libexec/atrun executor (run by .Xr cron 8 ) -.Dp +.El .Sh SEE ALSO .Xr atq 1 , .Xr atrm 1 , @@ -179,19 +190,11 @@ executor (run by .Xr sleep 1 , .Sh DIAGNOSTICS Complains about various syntax errors and times out of range. -.Sh HISTORY -.Nm At -appeared in Version 7 AT&T UNIX. .Sh BUGS The queueing mechanism .Pa /usr/libexec/atrun , is scheduled by .Xr cron 8 . -Frequency with which -.Xr cron 8 -runs -.Pa /usr/libexec/atrun -is site dependent. If it is run infrequently, a job may fall thru the cracks. .Pp @@ -206,3 +209,7 @@ Sometimes old spool files are not removed from the directory .Pa /var/spool/at/past . This is usually due to a system crash, and requires that they be removed by hand. +.Sh HISTORY +An +.Nm +command appeared in Version 7 AT&T UNIX.