1.\"/* Copyright 1988,1990,1993 by Paul Vixie 2.\" * All rights reserved 3.\" */ 4.\" 5.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") 6.\" Copyright (c) 1997,2000 by Internet Software Consortium, Inc. 7.\" 8.\" Permission to use, copy, modify, and distribute this software for any 9.\" purpose with or without fee is hereby granted, provided that the above 10.\" copyright notice and this permission notice appear in all copies. 11.\" 12.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES 13.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 14.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR 15.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 16.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 17.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 18.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 19.\" 20.\" $OpenBSD: crontab.1,v 1.26 2009/02/08 17:15:11 jmc Exp $ 21.\" 22.Dd $Mdocdate: February 8 2009 $ 23.Dt CRONTAB 1 24.Os 25.Sh NAME 26.Nm crontab 27.Nd maintain crontab files for individual users 28.Sh SYNOPSIS 29.Nm crontab 30.Op Fl u Ar user 31.Ar file 32.Nm crontab 33.Oo 34.Fl e | l | r 35.Oc 36.Op Fl u Ar user 37.Sh DESCRIPTION 38.Nm 39is the program used to install, deinstall, or list the tables 40used to drive the 41.Xr cron 8 42daemon. 43Each user can have their own 44.Xr crontab 5 , 45and though these are files in 46.Pa /var/cron/tabs , 47they are not intended to be edited directly. 48.Pp 49The first form of this command is used to install a new crontab from some 50named file, or standard input if the pseudo-filename 51.Sq Fl 52is given. 53.Pp 54If the 55.Pa /var/cron/cron.allow 56file exists, then you must be listed therein in order to use 57.Nm crontab . 58If the 59.Pa /var/cron/cron.allow 60file does not exist but the 61.Pa /var/cron/cron.deny 62file does exist, then you must 63.Em not 64be listed in the 65.Pa /var/cron/cron.deny 66file in order to use 67.Nm crontab . 68If neither of these files exists then only the super user 69will be allowed to use 70.Nm crontab . 71.Em NOTE : 72if they exist, 73.Pa /var/cron/cron.allow 74and 75.Pa /var/cron/cron.deny 76must be readable by group crontab. 77If 78.Nm 79is unable to read the files, users will not be allowed to use 80.Nm crontab . 81.Pp 82The options are as follows: 83.Bl -tag -width "-u userX" 84.It Fl e 85Edit the current crontab using the editor specified by 86the 87.Ev VISUAL 88or 89.Ev EDITOR 90environment variables. 91After you exit from the editor, the modified 92.Xr crontab 5 93will be installed automatically. 94.It Fl l 95Causes the current crontab to be displayed on standard output. 96.It Fl r 97Causes the current crontab to be removed. 98.It Fl u Ar user 99Specifies the name of the user whose 100.Xr crontab 5 101is to be edited. 102If this option is not given, 103.Nm 104examines 105.Dq your 106.Xr crontab 5 ; 107i.e., the 108crontab of the person executing the command. 109Note that 110.Xr su 1 111can confuse 112.Nm 113and that if you are running inside of 114.Xr su 1 115you should always use the 116.Fl u 117option for safety's sake. 118.El 119.Sh FILES 120.Bl -tag -width "/var/cron/cron.allow" -compact 121.It Pa /var/cron/cron.allow 122list of users allowed to use crontab 123.It Pa /var/cron/cron.deny 124list of users prohibited from using crontab 125.It Pa /var/cron/tabs 126directory of individual crontabs 127.El 128.Sh DIAGNOSTICS 129A fairly informative usage message appears if you run it with a bad command 130line. 131.Sh SEE ALSO 132.Xr at 1 , 133.Xr crontab 5 , 134.Xr cron 8 135.Sh STANDARDS 136The 137.Nm 138utility is compliant with the 139.St -p1003.1-2008 140specification. 141.Pp 142The flag 143.Op Fl u 144is an extension to that specification. 145.Sh AUTHORS 146.An Paul Vixie Aq vixie@isc.org 147