16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Appendix I also explains how to set the local time zone with the TZ environment<br />

variable.<br />

For more information about customizing cron, see ″Customizing the cron, uucp,<br />

and mail utilities for a read-only root file system″ and ″Customizing the cron and<br />

uucp Utilities″ in z/<strong>OS</strong> <strong>UNIX</strong> <strong>System</strong> <strong>Services</strong> Planning.<br />

crontab — Schedule regular background jobs<br />

Format<br />

Description<br />

crontab [–e|–l|–r] [–u user] [file]<br />

crontab creates or changes your crontab entry. The crontab is a system facility that<br />

automatically runs a set of commands for you on a regular schedule. For example,<br />

you might set up your crontab entry so it runs a job every night at midnight, or once<br />

a week during low-use hours. This job could perform regular maintenance chores,<br />

for example, backing up files or getting rid of unnecessary work files.<br />

To set up a crontab entry, use:<br />

crontab file<br />

If you omit the file argument, crontab takes input from standard input (stdin).<br />

Note: In this mode, you must provide your entire crontab file. This replaces any<br />

other existing crontab entries. If you issue crontab with no options, do not<br />

enter the end-of-file character or you will end up with an empty crontab file.<br />

Press INTERRUPT instead.<br />

Input consists of six fields, separated by blanks. All blank lines and any input that<br />

contains a # as the first non-blank character are ignored. The first five give a date<br />

and time in the following form:<br />

v A minute, expressed as a number from 0 through 59<br />

v An hour, expressed as a number from 0 through 23<br />

v A day of the month, expressed as a number from 1 through 31<br />

v A month of the year, expressed as a number from 1 through 12<br />

cron daemon<br />

v A day of the week, expressed as a number from 0 through 6 (with 0 standing for<br />

Sunday)<br />

Important Note: All times use a system default time zone. Your system<br />

administrator can tell you what it is. The cron daemon does not<br />

use the value of the environment variable TZ when crontab is<br />

invoked.<br />

Any of these fields may contain an asterisk (*) standing for all possible values. For<br />

example, if you have an * as the day of the month, the job runs every day of the<br />

month. A field can also contain a set of numbers separated by commas, or a range<br />

of numbers, with the first number followed by a minus sign – followed by the second<br />

number. If you give specific days for both day of the month and day of the week,<br />

the two are ORed together. Here are some examples:<br />

Chapter 2. Shell command descriptions 171

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!