BSD 4_4 development
[unix-history] / usr / share / man / cat1 / at.0
CommitLineData
98473598
C
1AT(1) BSD Reference Manual AT(1)
2
3N\bNA\bAM\bME\bE
4 a\bat\bt - schedule execution of commands `at' a given time
5
6S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
7 a\bat\bt [-\b-c\bc] [-\b-m\bm] [-\b-s\bs] _\bt_\bi_\bm_\be [_\bd_\ba_\by] [_\bc_\bo_\bm_\bm_\ba_\bn_\bd_\b__\bf_\bi_\bl_\be]
8
9D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
10 A\bAt\bt schedules execution of commands at the specified _\bt_\bi_\bm_\be. The commands
11 may be given to a\bat\bt via the _\bc_\bo_\bm_\bm_\ba_\bn_\bd_\b__\bf_\bi_\bl_\be or accepted from the standard in-
12 put. A\bAt\bt will pass these commands to the appropriate shell at the re-
13 quested time. While awaiting execution, the jobs reside in a spool direc-
14 tory and may be examined by the atq(1) program.
15
16 Options available:
17
18 -\b-c\bc _\bC_\bo_\bm_\bm_\ba_\bn_\bd_\b__\bf_\bi_\bl_\be contains csh(1) commands.
19
20 -\b-s\bs _\bC_\bo_\bm_\bm_\ba_\bn_\bd_\b__\bf_\bi_\bl_\be contains sh(1) commands.
21
22 -\b-m\bm Mail will be sent to the user after the job has been run. If er-
23 rors occur during execution of the job, then a copy of the error
24 diagnostics will be sent to the user. If no errors occur, then a
25 short message is sent informing the user that no errors occurred.
26
27 If a _\bc_\bo_\bm_\bm_\ba_\bn_\bd_\b__\bf_\bi_\bl_\be is not specified, a\bat\bt prompts for commands from standard
28 input until a `^D' is typed.
29
30 The format of the spool file is as follows: a four line header that in-
31 cludes the owner of the job, the name of the job, the shell used to run
32 the job, and whether mail will be sent after the job is executed. The
33 header is followed by a c\bcd\bd command to the current directory and a u\bum\bma\bas\bsk\bk
34 command to set the modes on any files created by the job. A\bAt\bt copies all
35 relevant environment variables to the spool file. When the script is
36 run, it uses the user and group ID of the creator of the spool file.
37
38 The _\bt_\bi_\bm_\be is either a 24 hour military time _\bh_\bh_\bm_\bm_\b, where _\bh_\bh is hour and _\bm_\bm
39 is minutes, or the traditional 12 hour time with qualifying options:
40
41 am, a am
42 pm, p pm
43 n noon
44 m midnight
45
46 The time can be abbreviated as shown below in EXAMPLES.
47
48 A _\bd_\ba_\by of the week may be specified by the first two letters of its name.
49 A week (7 days) may be specified by the argument _\bw_\be_\be_\bk. If a month name is
50 given, the following argument is expected to be the day (numeric).
51
52E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT
53 If a shell is not specified, the current environment variable SHELL is
54 used.
55
56E\bEX\bXA\bAM\bMP\bPL\bLE\bES\bS
57 at 10p Execute at 10pm today, or tomorrow if 10pm has past. Use the
58 shell found in the environment variable SHELL.
59
60 at -c -m 1705 mo
61 Execute at 5:05pm on Monday using csh(1) and send mail upon com-
62 pletion or termination of the job.
63
64 at -s -m 1200n week
65 Execute at noon one week from today, using sh(1) and send mail
66
67 upon completetion.
68
69 at -s 8a apr 1
70 Ideally this would be given late in March. The commands would be
71 run at 8 am on April first, using the sh(1).
72
73E\bER\bRR\bRO\bOR\bRS\bS
74 Errors must be collected via the -\b-m\bm option or by redirecting the standard
75 output from inside the _\bc_\bo_\bm_\bm_\ba_\bn_\bd_\b__\bf_\bi_\bl_\be_\b.
76
77F\bFI\bIL\bLE\bES\bS
78 /var/spool/at spooling area
79 /var/spool/at/yy.ddd.hhhh.* job file
80 /var/spool/at/past directory where jobs are executed from
81 /var/spool/at/lasttimedone last time atrun was run
82 /var/libexec/atrun executor (run by cron(8))
83
84S\bSE\bEE\bE A\bAL\bLS\bSO\bO
85 atq(1), atrm(1), calendar(1), cron(8) sleep(1),
86
87D\bDI\bIA\bAG\bGN\bNO\bOS\bST\bTI\bIC\bCS\bS
88 Complains about various syntax errors and times out of range.
89
90B\bBU\bUG\bGS\bS
91 The queueing mechanism _\b/_\bu_\bs_\br_\b/_\bl_\bi_\bb_\be_\bx_\be_\bc_\b/_\ba_\bt_\br_\bu_\bn, is scheduled by cron(8). If
92 it is run infrequently, a job may fall thru the cracks.
93
94 There are known problems attempting to specify a time of 2400 hours to
95 a\bat\bt.
96
97 If the system crashes, mail is not sent to the user informing them that
98 the job was not completed.
99
100 Sometimes old spool files are not removed from the directory
101 _\b/_\bv_\ba_\br_\b/_\bs_\bp_\bo_\bo_\bl_\b/_\ba_\bt_\b/_\bp_\ba_\bs_\bt. This is usually due to a system crash, and requires
102 that they be removed by hand.
103
104H\bHI\bIS\bST\bTO\bOR\bRY\bY
105 An a\bat\bt command appeared in Version 7 AT&T UNIX.
106
1074th Berkeley Distribution June 29, 1993 2