# -------------------------------------------------------------
# Sample CRONTAB to illustrate the use of CRON. Syntax of
# CRONTAB lines is:
#
#   min hour day month day-of-week [!]command[;[!]command...]
#
# Lines starting with '#' and blank lines are ignored.
#
# In the first 5 fields, an asterisk ('*') means 'all' and over-
# rides any other characters in the field.
# Otherwise, both single values, lists and ranges may be given.
# Limits:
#	min	-- 0..59
#	hour	-- 0..23
#	day	-- 1..31 (subject to month variations)
#	month	-- 1..12
#	dow	-- 0..6, 0 = Sunday.
# Fields can be separated by any number of tabs and spaces. Space
# is not allowed within a field, except in the command field.
# Maximum line length is 510 characters.
#
# For best results, set the TZ environment variable to something like
#	TZ=CET-1
# meaning for example "Central European Time, -1 hour after (i.e. 1
# hour before) GMT. If TZ is not set, CRON believes in US
# West Coast time, where Borland lives.
#
# The command section can consist of 1 or more commands, separated
# by ';'. If you need a literal ';' in a command, escape it by entering
# it as '\;' (i.e. prefixed with a backslash).
# Commands prefixed with '!' are executed by the SHELL, i.e.
# by spawning an extra copy of COMMAND.COM. This allows the normal
# DOS redirection facilities, i.e. <, >, >> and | to be used in
# commands, but the return value of the command is lost. CRONLOG
# will show a return code 0 if CRON was able to spawn COMMAND.COM,
# even if COMMAND.COM was unable to spawn the command in its turn.
# This happens because, as we all know, COMMAND.COM isn't the
# brightest boy in the class.
# I suspect that 4DOS or some other intelligent shell program can
# handle this in a better way, although I have not tested this.
#
# If you need '!' or '~' in commands, prefix them with a backslash
# i.e. '\!' and '\~'.
#
# Because the backslash is the universal escape character, it is
# necessary to enter two backslashes in path names, etc.
#
# All right, let's try a few entries.
# --------------------------------------------------------------------
# Print calendar as early as possible on each new year's eve.
1 0 1 1 * !calendar >LPT1

# --------------------------------------------------------------------
# Call my daily BBS'es every night, monday to friday
45 3 * * 1-5 yam call daily

# --------------------------------------------------------------------
# Call BIX once a week doing the standard things (each monday morning)
47 2 * * 1 yam call bix,grab,newf,logout,quit

# --------------------------------------------------------------------
# Back up D: drive to the network server twice a month.
# Note the double backslashes!
38 2 1,15 * * !d:;!cd \\;pkzip -a -ex -r -p -JR n:\\tron\\save\\ddrive

# --------------------------------------------------------------------
# Back up project subdirectory every night (tuesday to saturday)
27 1 * * 2-6 !d:;!cd \\project;pkzip -a -ex -r -p -JR n:\\tron\\save\\project

# --------------------------------------------------------------------
# Print an accounting report every monday and the 1. of every month.
54 5 1 * 1 prtacct

# --------------------------------------------------------------------
# Process telecommunications logs quarterly, send to network laser
37 4 1 1,4,7,10 * !f:;!cd \\yam\\logfiles;!yamlogs -a >rpt;nprint Q=LASER rpt

# End of sample crontab
