THE VIRTUAL SERVER HANDBOOK
An asterisk (*) may be used as a wildcard meaning "first through last". The
asterisk is used when you want an event to occur for every allowable value.
For example, if you wanted to schedule your log files to be purged on a
monthly basis you could place an asterisk in the Day of Month field. As you
might imagine, it would be unwise to put an asterisk in the Minute field of
the Cronfile as it may cause too much of a load on your Virtual Server.
Ranges such as two numbers separated with a hyphen ( ) are allowed. For
example, if you wanted the Cron to send you E mail to warn you that your
taxes are due April 15th, and you want to be warned starting in January
until they are due in April, you could create a Cronfile with the value 1 4 in
the month field, and the Cron would run starting in January until April. You
can specify a list of values by separating the numbers with a comma. For
example, 1,7,9,10 would be the months January, July, September, and
October. Skip values can be specified with the "/" sign. For example, 1 12/2
would be "every other month". Names can also be used for the month and
day of the week fields. The first three letters of the month or day can be
used. This option is not allowable with ranges or lists.
Here are some additional examples of valid time/date values:
Example:
What it does (examples are in the hour field)
8 12
Event will execute each hour in the range 8,9,10,11,12
1,4,5,7
Event will execute each hour specified 1,4,5,7
0 4,8 12
Event will execute each in the two ranges
0 23/2
Event will execute every other hour 2,4,6,8....
*/2
Same as above
The sixth field in a Cron file (i.e., rest of the Cron line) are where you place
the command you want to run. The entire command portion, up to the
newline character or the % character will be executed by /bin/sh (or the
shell you have specified with the SHELL environmental variable). Percent
signs in the command, unless they are escaped with a backslash (\) will be
changed into newline characters and all data after the first % will be sent to
the command as standard input.
Example Cron for mailing a notice about taxes:
# This is a comment.
SHELL=/bin/csh
MAILTO=johndoe@somedomain.com
5 22 14 1 4 * mail  s "Your taxes are due on
April 15th"
judy@somedomain.com%Judy,%%Fill out your taxes!%
Note:  Do not place hard returns in Cron commands (the line wraps on
its own). Hard returns tell Cron that the end of the Cron command has
occurred.
Example Cron for deleting logs monthly:
MAILTO=johndoe@somedomain.com
1 3 * * * /usr/local/bin/virtual vnl  r
COPYRIGHT 
 1999  DIGITAL TOOLS  LLC.
59




  

Home

About Services Network Support FAQ Order Contact
 

Web Cam WebHosting

Our partners:Jsp Web Hosting Unlimited Web Hosting Cheapest Web Hosting  Java Web Hosting Web Templates Best Web Templates PHP Mysql Web Hosting Interland Web Hosting Cheap Web Hosting PHP Web Hosting Tomcat Web Hosting Quality Web Hosting Best Web Hosting  Mac Web Hosting 

Lunarwebhost.net  Business web hosting division of Vision Web Hosting Inc. All rights reserved