Initial import from FreeBSD RELENG_4:
[dragonfly.git] / usr.sbin / cron / crontab / crontab.1
1 .\"/* Copyright 1988,1990,1993 by Paul Vixie
2 .\" * All rights reserved
3 .\" *
4 .\" * Distribute freely, except: don't remove my name from the source or
5 .\" * documentation (don't take credit for my work), mark your changes (don't
6 .\" * get me blamed for your possible bugs), don't alter or remove this
7 .\" * notice.  May be sold if buildable source is provided to buyer.  No
8 .\" * warrantee of any kind, express or implied, is included with this
9 .\" * software; use at your own risk, responsibility for damages (if any) to
10 .\" * anyone resulting from the use of this software rests entirely with the
11 .\" * user.
12 .\" *
13 .\" * Send bug reports, bug fixes, enhancements, requests, flames, etc., and
14 .\" * I'll try to keep a version up to date.  I can be reached as follows:
15 .\" * Paul Vixie          <paul@vix.com>          uunet!decwrl!vixie!paul
16 .\" */
17 .\"
18 .\" $FreeBSD: src/usr.sbin/cron/crontab/crontab.1,v 1.7.2.4 2002/06/21 16:40:09 charnier Exp $
19 .\"
20 .Dd December 29, 1993
21 .Dt CRONTAB 1
22 .Os
23 .Sh NAME
24 .Nm crontab
25 .Nd maintain crontab files for individual users (V3)
26 .Sh SYNOPSIS
27 .Nm
28 .Op Fl u Ar user
29 .Ar file
30 .Nm
31 .Op Fl u Ar user
32 {
33 .Fl l |
34 .Fl r |
35 .Fl e
36 }
37 .Sh DESCRIPTION
38 The
39 .Nm
40 utility is the program used to install, deinstall or list the tables
41 used to drive the
42 .Xr cron 8
43 daemon in Vixie Cron.  Each user can have their own crontab, and though
44 these are files in
45 .Pa /var ,
46 they are not intended to be edited directly.
47 .Pp
48 If the
49 .Pa allow
50 file exists, then you must be listed therein in order to be allowed to use
51 this command.  If the
52 .Pa allow
53 file does not exist but the
54 .Pa deny
55 file does exist, then you must
56 .Em not
57 be listed in the
58 .Pa deny
59 file in order to use this command.  If neither of these files exists, then
60 depending on site-dependent configuration parameters, only the super user
61 will be allowed to use this command, or all users will be able to use this
62 command.
63 The format of these files is one username per line,
64 with no leading or trailing whitespace.
65 Lines of other formats will be ignored,
66 and so can be used for comments.
67 .Pp
68 The first form of this command is used to install a new crontab from some
69 named file or standard input if the pseudo-filename ``-'' is given.
70 .Pp
71 The following options are available:
72 .Bl -tag -width indent
73 .It Fl u
74 Specify the name of the user whose crontab is to be
75 tweaked.  If this option is not given,
76 .Nm
77 examines "your" crontab, i.e., the crontab of the person executing the
78 command.  Note that
79 .Xr su 1
80 can confuse
81 .Nm
82 and that if you are running inside of
83 .Xr su 1
84 you should always use the
85 .Fl u
86 option for safety's sake.
87 .It Fl l
88 Display the current crontab on standard output.
89 .It Fl r
90 Remove the current crontab.
91 .It Fl e
92 Edit the current crontab using the editor specified by
93 the
94 .Ev VISUAL
95 or
96 .Ev EDITOR
97 environment variables.
98 The specified editor
99 .Em must
100 edit the file in place;
101 any editor that unlinks the file and recreates it cannot be used.
102 After you exit
103 from the editor, the modified crontab will be installed automatically.
104 .El
105 .Sh SEE ALSO
106 .Xr crontab 5 ,
107 .Xr cron 8
108 .Sh FILES
109 .Bl -tag -width /var/cron/allow -compact
110 .It Pa /var/cron/allow
111 .It Pa /var/cron/deny
112 .El
113 .Sh STANDARDS
114 The
115 .Nm
116 command conforms to
117 .St -p1003.2 .
118 This new command syntax
119 differs from previous versions of Vixie Cron, as well as from the classic
120 SVR3 syntax.
121 .Sh DIAGNOSTICS
122 A fairly informative usage message appears if you run it with a bad command
123 line.
124 .Sh AUTHORS
125 .An Paul Vixie Aq paul@vix.com