cron
cron is a clock daemon that runs commands at specified dates and times. You can specify regularly scheduled commands as described in crontab. You can also submit jobs that are to be run only once using the at command. cron runs commands with priorities and limits set by the queuedefs file. cron uses the value from queuedefs to lower the priority for non-UID=0 users only. The priority is unchanged for UID=0 users.
cron only examines crontab files and at command files when initializing or when a file changes using crontab or at. This reduces the overhead of checking for new or changed files at regularly scheduled intervals.
The setuid bit for cron should never be set; however, it must be started by a user with appropriate privileges to issue the setuid call for any UID. Because cron never exits, it should only be run once, normally during the system initialization process. cron automatically forks and runs itself in the background, in a new shell session. cron uses the pid file to prevent more than one cron running at the same time.
When matching the date and time expressions given in crontab entries, cron uses the time zone in effect when the system started the daemon. As a result, you should ensure that the TZ environment variable is set at this time. For information about setting the TZ environment variable, see Format of the TZ environment variable. For at jobs, cron uses the value of TZ in effect when you submitted the job.
at, batch, and crontab submit jobs to cron; the data for those jobs can contain double-byte characters. When the jobs are executed, the data in the jobs are interpreted in the locale that cron is using. Because it is strongly recommended that cron be started in the POSIX locale, double-byte characters in the jobs may not be interpreted correctly. You can get around this by calling the setlocale() system call in the job itself.
kill –TERM pid
where pid is
the cron's PID number. To find the cron's PID number, you can use:
ps -e | grep cron
Queue `c' 5j2n15w:
queued 4, running 5, jobs 5
Next try for queued jobs 13 seconds
RUNNING: uid/gid: 0/512: pid 33554441: sleep 10000 RUNNING: uid/gid: 0/512:
pid 385875972: echo start; sleep 10000; echo end RUNNING: uid/gid: 0/512: pid
67108876: echo start; sleep 10000; echo end RUNNING: uid/gid: 0/512: pid
33554445: echo start; sleep 10000; echo end RUNNING: uid/gid: 0/512: pid
67108879: echo start; sleep 10000; echo end QUEUED: uid/gid: 0/512: echo Hello!
QUEUED: uid/gid: 0/512: echo start; sleep 10000; echo end
QUEUED: uid/gid: 0/512: echo Hello!
QUEUED: uid/gid: 0/512: echo start; sleep 10000; echo end
cron uses
a number of files in the /usr/lib/cron directory to determine
which users may and may not use the at and crontab commands.
at, crontab, mailx
Format of the TZ environment variable explains how to set the local time zone with the TZ environment variable.
For more information about customizing cron, see the section on customizing the cron, uucp, and mail utilities for a read-only root file system in z/OS UNIX System Services Planning. Also see the section about customizing the cron and uucp utilities in z/OS UNIX System Services Planning.