Each time cfengine is run, it reads the system clock and defines the following classes based on the time and date:
Yrxx::
Month::
Day::
Dayxx::
Hrxx::
Minxx::
Minxx_xx::
Time classes based on the precise minute at which cfengine started are
unlikely to be useful, since it is improbable that you will want to ask
cron to run cfengine every single minute of every day: there would be no
time for anything to complete before it was started again. Moreover,
many things could conspire to delay the precise time at which cfengine
were started. The real purpose in being able to detect the precise
start time is to define composite classes which refer to arbitrary
intervals of time. To do this, we use the group
or classes
action to create an alias for a group of time values.
Here are some creative examples:
classes: # synonym groups: LunchAndTeaBreaks = ( Hr12 Hr10 Hr15 ) NightShift = ( Hr22 Hr23 Hr00 Hr01 Hr02 Hr03 Hr04 Hr05 Hr06 ) ConferenceDays = ( Day26 Day27 Day29 Day30 ) QuarterHours = ( Min00 Min15 Min30 Min45 ) TimeSlices = ( Min01 Min02 Min03 Min33 Min34 Min35)
In these examples, the left hand sides of the assignments are effectively the ORed result of the right hand side. This if any classes in the parentheses are defined, the left hand side class will become defined. This provides an excellent and readable way of pinpointing intervals of time within a program, without having to use `|' and `.' operators everywhere.
Go to the first, previous, next, last section, table of contents.