Up: crontab   [Contents][Index]


4.1 crontab Invocation

The crontab usage is:

crontab [-u name] file

Copy mode. Replace the crontab of the user who invoked the command with the content of file.

The -u is allowed only for super-user. With this option, the crontab of the user name is replaced.

crontab [-eilr] [-u name]

List (-l), edit (-e) or remove (-r) the user’s crontab.

The -u is allowed only for super-user. With this option, the command operates on the crontab of the user name.

crontab -g [-u name] [-eilr] file

List (-l), edit (-e) or remove (-r) the crontab file in the crongroup of the current user (or user name). (see User Group Crontabs)

The -u option is allowed for super-user and any user whose primary group matches that of the user name.

The following table summarizes command line options of the crontab utility:

-e

Edit crontab.

-g

Operate on user cron group files.

-h

Print a short command line usage summary and exit.

-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 the crontab.

-u name

Operate on crontab of user name.

-V

Print program version, licensing information and exit.