z/OS UNIX System Services Planning
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Steps for customizing the cron daemon

z/OS UNIX System Services Planning
GA32-0884-00

Before you begin: You need to make sure that several files have the correct settings.
  1. The at, batch, and crontab executable program files must be owned by a UID(0) user, and the setuid bit must be set. To check the settings, issue:
    ls -E /bin/at /bin/batch /bin/crontab
  2. The cron executable program file must have the setuid bit off and the program control attribute set. To check the settings, issue:
    ls -E /usr/sbin/cron

Perform the following steps to set up the cron daemon.

  1. Copy /samples/queuedefs to /usr/lib/cron/queuedefs.
    Example:
    cp /samples/queuedefs /usr/lib/cron/queuedefs

    _______________________________________________________________

  2. Set up the queue definitions in the /usr/lib/cron/queuedefs file.
    Example:
    c.5j2n15w
    c
    Queue name. The default queue name for crontab jobs isc.
    5
    Number of jobs running at the same time. Set this to the appropriate value for your installation.
    2
    The nice value mapped to the PRIORITYGOAL or PRIORITYPG statement in BPXPRMxx. Set this to the appropriate value for your installation.
    15
    If five jobs are already running, wait 15 seconds before trying the next job.

    _______________________________________________________________

  3. Create lists for allowed and denied users for the crontab command:
    • Allowed users: /usr/lib/cron/cron.allow
    • Denied users: /usr/lib/cron/cron.deny

    Tip: To give access to all users, create an empty cron.deny file and do not create an cron.allow file.

    _______________________________________________________________

  4. Create lists for allowed and denied users for the at command:
    • Allowed users: /usr/lib/cron/at.allow
    • Denied users: /usr/lib/cron/at.deny

    Tip: To give access to all users, create an empty at.deny file and do not create an at.allow file.

    _______________________________________________________________

  5. Set the TZ environment variable as described in z/OS UNIX System Services Command Reference. cron uses this time zone when matching the crontab entries. at jobs use the TZ of the user.

    _______________________________________________________________

When you are done, the cron daemon has been customized and can be started. For more information about starting daemons, see Starting daemons.
Note:
  1. Because cron might try to send mail, you might want to configure the mailx utility as described in Customizing electronic mail.
  2. The job log file is in /usr/spool/cron/log and can be used when debugging. The log file must be periodically archived and cleaned up or it will grow too large.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014