CRONTAB

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
SEE ALSO
COPYRIGHT

NAME

crontab - manipulate per-user and user-group crontabs

SYNOPSIS

crontab [-i] [-u NAME] FILE
crontab
[-eilr] [-u NAME]
crontab -g [-u
NAME] [-eilr] FILE
crontab -h
crontab -V

DESCRIPTION

Allows the user to list, edit or remove personal or group crontabs.

The micrond(8) cron daemon reads crontabs from several crontab groups, two of which contain crontabs for particular system users. The user crongroup contains per-user crontabs, and the group crongroup contains user crontabs editable by a group of users (see the micrond(8) manual page for details). By default, crontab operates on per-user crontabs. To edit group crontabs, the -g option must be specifed.

When run without arguments, crontab enters copy mode, in which it copies the content of the supplied FILE to the user personal crontab, overwriting its prior content.

To list the content of the crontab, use the -l option. It will be displayed on standard output.

To edit it, run crontab with the -e option. A temporary copy of the crontab will be created and loaded to the editor specified by the VISUAL environment variable. If it is unset, the EDITOR variable is consulted. If this variable is unset, the built-in setting (vi) will be used.

Once you quit the editor, the edited crontab will be atomically moved to your personal crontab, which will be re-read by micrond.

The -r option removes the crontab.

The super-user can address the crontab of a particular user by supplying the user’s login name with the -u option. The use of this option is restricted for super-user, except if used together with the -g option (see below).

When using destructive operations (such as copying or removal), it is safer to use the -i option which instructs the program to ask for the user consent before undertaking the modification.

User crontab groups contain multiple files for each system user. They are useful for certain pseudo-accounts. For example, a site running multiple web services may need to install separate crontabs for each of them and to allow users who run these services to edit their crontabs. This is done using the -g option. The name of the account for which the crontab is edited is supplied with the -u option. For example, to edit a crontab ’’portal’’ in account ’’www-data’’, one would use:

crontab -g -u www-data -e portal

The use of group crontabs for account X is allowed only for users who are members of the primary group of X.

OPTIONS

-e

Edit crontab.

-i

Interactively ask before removing or replacing.

-l

List crontab content. When used with the -g option, this option lists the content of the crontab FILE in the group. If FILE is not supplied, displays the list of available crontabs in the group, along with their owners.

-r

Remove crontab.

-g

Operate on user cron group files.

-u NAME

Operate on crontab of user NAME.

-V

Print program version, licensing information and exit.

SEE ALSO

micrond(8), crontab(5).

COPYRIGHT

Copyright © 2020-2021 Sergey Poznyakoff <gray@gnu.org>
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.


Manpage server at man.gnu.org.ua.

Powered by mansrv 1.1