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