xref: /freebsd/usr.sbin/cron/crontab/crontab.1 (revision d21656dcabd2cd5740927495479e0819bc3e9ca0)
184f33deaSJordan K. Hubbard.\"/* Copyright 1988,1990,1993 by Paul Vixie
284f33deaSJordan K. Hubbard.\" * All rights reserved
384f33deaSJordan K. Hubbard.\" *
484f33deaSJordan K. Hubbard.\" * Distribute freely, except: don't remove my name from the source or
584f33deaSJordan K. Hubbard.\" * documentation (don't take credit for my work), mark your changes (don't
684f33deaSJordan K. Hubbard.\" * get me blamed for your possible bugs), don't alter or remove this
784f33deaSJordan K. Hubbard.\" * notice.  May be sold if buildable source is provided to buyer.  No
884f33deaSJordan K. Hubbard.\" * warrantee of any kind, express or implied, is included with this
984f33deaSJordan K. Hubbard.\" * software; use at your own risk, responsibility for damages (if any) to
1084f33deaSJordan K. Hubbard.\" * anyone resulting from the use of this software rests entirely with the
1184f33deaSJordan K. Hubbard.\" * user.
1284f33deaSJordan K. Hubbard.\" *
1384f33deaSJordan K. Hubbard.\" * Send bug reports, bug fixes, enhancements, requests, flames, etc., and
1484f33deaSJordan K. Hubbard.\" * I'll try to keep a version up to date.  I can be reached as follows:
1584f33deaSJordan K. Hubbard.\" * Paul Vixie          <paul@vix.com>          uunet!decwrl!vixie!paul
1684f33deaSJordan K. Hubbard.\" */
1784f33deaSJordan K. Hubbard.\"
1897d92980SPeter Wemm.\" $FreeBSD$
1984f33deaSJordan K. Hubbard.\"
20*d21656dcSConrad Meyer.Dd December 20, 2016
21401e6468SPhilippe Charnier.Dt CRONTAB 1
22401e6468SPhilippe Charnier.Os
23401e6468SPhilippe Charnier.Sh NAME
24401e6468SPhilippe Charnier.Nm crontab
25401e6468SPhilippe Charnier.Nd maintain crontab files for individual users (V3)
26401e6468SPhilippe Charnier.Sh SYNOPSIS
27e97407b4SRuslan Ermilov.Nm
28401e6468SPhilippe Charnier.Op Fl u Ar user
29401e6468SPhilippe Charnier.Ar file
30e97407b4SRuslan Ermilov.Nm
31401e6468SPhilippe Charnier.Op Fl u Ar user
32401e6468SPhilippe Charnier{
33401e6468SPhilippe Charnier.Fl l |
34*d21656dcSConrad Meyer.Fl r Op Fl f
35*d21656dcSConrad Meyer|
36401e6468SPhilippe Charnier.Fl e
37401e6468SPhilippe Charnier}
38401e6468SPhilippe Charnier.Sh DESCRIPTION
397f94b8deSPhilippe CharnierThe
407f94b8deSPhilippe Charnier.Nm
417f94b8deSPhilippe Charnierutility is the program used to install, deinstall or list the tables
4284f33deaSJordan K. Hubbardused to drive the
43401e6468SPhilippe Charnier.Xr cron 8
44aaa66740STom Rhodesdaemon in Vixie Cron.
45aaa66740STom RhodesEach user can have their own crontab, and though
46401e6468SPhilippe Charnierthese are files in
47401e6468SPhilippe Charnier.Pa /var ,
48401e6468SPhilippe Charnierthey are not intended to be edited directly.
49401e6468SPhilippe Charnier.Pp
5084f33deaSJordan K. HubbardIf the
51401e6468SPhilippe Charnier.Pa allow
5284f33deaSJordan K. Hubbardfile exists, then you must be listed therein in order to be allowed to use
53aaa66740STom Rhodesthis command.
54aaa66740STom RhodesIf the
55401e6468SPhilippe Charnier.Pa allow
5684f33deaSJordan K. Hubbardfile does not exist but the
57401e6468SPhilippe Charnier.Pa deny
58401e6468SPhilippe Charnierfile does exist, then you must
59401e6468SPhilippe Charnier.Em not
60401e6468SPhilippe Charnierbe listed in the
61401e6468SPhilippe Charnier.Pa deny
62aaa66740STom Rhodesfile in order to use this command.
63aaa66740STom RhodesIf neither of these files exists, then
6484f33deaSJordan K. Hubbarddepending on site-dependent configuration parameters, only the super user
6584f33deaSJordan K. Hubbardwill be allowed to use this command, or all users will be able to use this
6684f33deaSJordan K. Hubbardcommand.
67377a2e03SDavid MaloneThe format of these files is one username per line,
68377a2e03SDavid Malonewith no leading or trailing whitespace.
69377a2e03SDavid MaloneLines of other formats will be ignored,
70377a2e03SDavid Maloneand so can be used for comments.
71401e6468SPhilippe Charnier.Pp
7284f33deaSJordan K. HubbardThe first form of this command is used to install a new crontab from some
73aaa66740STom Rhodesnamed file or standard input if the pseudo-filename
74b18b186eSRuslan Ermilov.Sq Fl
75aaa66740STom Rhodesis given.
76401e6468SPhilippe Charnier.Pp
77401e6468SPhilippe CharnierThe following options are available:
78401e6468SPhilippe Charnier.Bl -tag -width indent
79401e6468SPhilippe Charnier.It Fl u
80401e6468SPhilippe CharnierSpecify the name of the user whose crontab is to be
81aaa66740STom Rhodestweaked.
82aaa66740STom RhodesIf this option is not given,
83401e6468SPhilippe Charnier.Nm
84aaa66740STom Rhodesexamines
85aaa66740STom Rhodes.Dq your
86aaa66740STom Rhodescrontab, i.e., the crontab of the person executing the
87aaa66740STom Rhodescommand.
88aaa66740STom RhodesNote that
89866d7f28SChris Costello.Xr su 1
90401e6468SPhilippe Charniercan confuse
91401e6468SPhilippe Charnier.Nm
92401e6468SPhilippe Charnierand that if you are running inside of
93866d7f28SChris Costello.Xr su 1
94401e6468SPhilippe Charnieryou should always use the
95401e6468SPhilippe Charnier.Fl u
96401e6468SPhilippe Charnieroption for safety's sake.
97401e6468SPhilippe Charnier.It Fl l
98401e6468SPhilippe CharnierDisplay the current crontab on standard output.
99401e6468SPhilippe Charnier.It Fl r
100401e6468SPhilippe CharnierRemove the current crontab.
101*d21656dcSConrad MeyerBy default the
102*d21656dcSConrad Meyer.Fl r
103*d21656dcSConrad Meyeroption prompts for confirmation, adding the
104*d21656dcSConrad Meyer.Fl f
105*d21656dcSConrad Meyeroption will attempt to remove the current crontab without confirmation.
106401e6468SPhilippe Charnier.It Fl e
107401e6468SPhilippe CharnierEdit the current crontab using the editor specified by
108401e6468SPhilippe Charnierthe
109401e6468SPhilippe Charnier.Ev VISUAL
110401e6468SPhilippe Charnieror
111401e6468SPhilippe Charnier.Ev EDITOR
11225e9ca2bSDavid Maloneenvironment variables.
11325e9ca2bSDavid MaloneThe specified editor
11425e9ca2bSDavid Malone.Em must
11525e9ca2bSDavid Maloneedit the file in place;
11625e9ca2bSDavid Maloneany editor that unlinks the file and recreates it cannot be used.
11725e9ca2bSDavid MaloneAfter you exit
11884f33deaSJordan K. Hubbardfrom the editor, the modified crontab will be installed automatically.
119401e6468SPhilippe Charnier.El
120401e6468SPhilippe Charnier.Sh FILES
121401e6468SPhilippe Charnier.Bl -tag -width /var/cron/allow -compact
122401e6468SPhilippe Charnier.It Pa /var/cron/allow
1230d83258dSChristian BruefferList of users allowed to use crontab
124401e6468SPhilippe Charnier.It Pa /var/cron/deny
1250d83258dSChristian BruefferList of users prohibited from using crontab
1260d83258dSChristian Brueffer.It Pa /var/cron/tabs
1270d83258dSChristian BruefferDirectory for personal crontab files
128401e6468SPhilippe Charnier.El
12959a3c79dSRuslan Ermilov.Sh DIAGNOSTICS
13059a3c79dSRuslan ErmilovA fairly informative usage message appears if you run it with a bad command
13159a3c79dSRuslan Ermilovline.
13259a3c79dSRuslan Ermilov.Sh SEE ALSO
13359a3c79dSRuslan Ermilov.Xr crontab 5 ,
13459a3c79dSRuslan Ermilov.Xr cron 8
135401e6468SPhilippe Charnier.Sh STANDARDS
13684f33deaSJordan K. HubbardThe
137401e6468SPhilippe Charnier.Nm
138401e6468SPhilippe Charniercommand conforms to
139b9ff618cSHartmut Brandt.St -p1003.2
140b9ff618cSHartmut Brandtwith the exception that the dangerous variant of calling
141b9ff618cSHartmut Brandt.Nm
142b9ff618cSHartmut Brandtwithout a file name in the first form of the command is not allowed by
143b9ff618cSHartmut Brandtthis implementation.
144aaa66740STom RhodesThe pseudo-filename
145b18b186eSRuslan Ermilov.Sq Fl
146aaa66740STom Rhodesmust be specified to read from standard input.
147b9ff618cSHartmut BrandtThe new command syntax
14884f33deaSJordan K. Hubbarddiffers from previous versions of Vixie Cron, as well as from the classic
14984f33deaSJordan K. HubbardSVR3 syntax.
150f12a1471SPhilippe Charnier.Sh AUTHORS
15101c2b8acSBaptiste Daroussin.An Paul Vixie Aq Mt paul@vix.com
152