cronadm Command

Purpose

Lists or removes crontab or at jobs.

Syntax

To List or Remove crontab Jobs

cronadm cron { {  -l -v } [ UserName ] ... |  -r UserName }

To List or Remove at Jobs

cronadm at { -lUserName ] | -rUserName JobName } }

Description

The cronadm command is used by a root user to list or remove all users crontab or at jobs.

The cron jobs are listed and removed by the UserName parameter. One or more UserNames can be specified. To list all cron jobs, do not specify a user. The at jobs are listed by UserName and can be removed either by the UserName parameter or by the JobName parameter.

The name of a crontab job file is the name of the user who submitted the crontab job and the name of the file in the /var/spool/cron/crontabs directory. The name of an at job is the name of the user who submitted the at job concatenated with a code for the time the at job was submitted.

Flags

cronadm cron

Item Description
-l Lists all crontab files. If the UserName parameter is specified, only the designated crontab files are listed.
-r Removes crontab files. The UserName parameter should be specified, to remove the designated crontab file.
-v Lists the status of all crontab jobs. If the UserName parameter is specified, only the designated crontab files are listed verbosely.

cronadm at

Item Description
-l Lists the at jobs for the user specified by the UserName parameter.
-r Removes the at job specified by either the UserName or JobName parameter.

Security

Access Control

Used only by a user with root authority.

Auditing Events

If the auditing subsystem is properly configured and is enabled, the cronadm command generates the following audit record (event) every time the command is run:

Event Information
AT_JobRemove Lists whether a crontab or at job was removed and when.

Attention RBAC users and Trusted AIX® users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.

Examples

  1. To list all crontab jobs, enter:

    cronadm cron  -l

  2. To list all at jobs currently queued for user bob, enter:

    cronadm at  -l bob

Files

Item Description
/usr/bin/cronadm Contains the cronadm command.