]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - usr.sbin/cron/crontab/crontab.1
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.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$
19 .\"
20 .Dd May 13, 2010
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.
44 Each user can have their own crontab, and though
45 these are files in
46 .Pa /var ,
47 they are not intended to be edited directly.
48 .Pp
49 If the
50 .Pa allow
51 file exists, then you must be listed therein in order to be allowed to use
52 this command.
53 If the
54 .Pa allow
55 file does not exist but the
56 .Pa deny
57 file does exist, then you must
58 .Em not
59 be listed in the
60 .Pa deny
61 file in order to use this command.
62 If neither of these files exists, then
63 depending on site-dependent configuration parameters, only the super user
64 will be allowed to use this command, or all users will be able to use this
65 command.
66 The format of these files is one username per line,
67 with no leading or trailing whitespace.
68 Lines of other formats will be ignored,
69 and so can be used for comments.
70 .Pp
71 The first form of this command is used to install a new crontab from some
72 named file or standard input if the pseudo-filename
73 .Sq Fl
74 is given.
75 .Pp
76 The following options are available:
77 .Bl -tag -width indent
78 .It Fl u
79 Specify the name of the user whose crontab is to be
80 tweaked.
81 If this option is not given,
82 .Nm
83 examines
84 .Dq your
85 crontab, i.e., the crontab of the person executing the
86 command.
87 Note that
88 .Xr su 1
89 can confuse
90 .Nm
91 and that if you are running inside of
92 .Xr su 1
93 you should always use the
94 .Fl u
95 option for safety's sake.
96 .It Fl l
97 Display the current crontab on standard output.
98 .It Fl r
99 Remove the current crontab.
100 .It Fl e
101 Edit the current crontab using the editor specified by
102 the
103 .Ev VISUAL
104 or
105 .Ev EDITOR
106 environment variables.
107 The specified editor
108 .Em must
109 edit the file in place;
110 any editor that unlinks the file and recreates it cannot be used.
111 After you exit
112 from the editor, the modified crontab will be installed automatically.
113 .El
114 .Sh FILES
115 .Bl -tag -width /var/cron/allow -compact
116 .It Pa /var/cron/allow
117 List of users allowed to use crontab
118 .It Pa /var/cron/deny
119 List of users prohibited from using crontab
120 .It Pa /var/cron/tabs
121 Directory for personal crontab files
122 .El
123 .Sh DIAGNOSTICS
124 A fairly informative usage message appears if you run it with a bad command
125 line.
126 .Sh SEE ALSO
127 .Xr crontab 5 ,
128 .Xr cron 8
129 .Sh STANDARDS
130 The
131 .Nm
132 command conforms to
133 .St -p1003.2
134 with the exception that the dangerous variant of calling
135 .Nm
136 without a file name in the first form of the command is not allowed by
137 this implementation.
138 The pseudo-filename
139 .Sq Fl
140 must be specified to read from standard input.
141 The new command syntax
142 differs from previous versions of Vixie Cron, as well as from the classic
143 SVR3 syntax.
144 .Sh AUTHORS
145 .An Paul Vixie Aq paul@vix.com