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