On 27 mai, 02:11, Paul Lathrop <[email protected]> wrote:
> Totally insignificant detail, but you should also change the line that says:
>
> "Optional; if specified, must be between 0 and 6, inclusive, with" to
> be "between 0 and 7"
Indeed I missed this one although it's just the line above ...
diff -ru puppet-0.24.8/lib/puppet/type/cron.rb puppet-0.24.8-cron-
patch/lib/puppet/type/cron.rb
--- puppet-0.24.8/lib/puppet/type/cron.rb 2009-03-23
22:35:33.000000000 +0100
+++ puppet-0.24.8-cron-patch/lib/puppet/type/cron.rb 2009-05-27
09:45:18.446596000 +0200
@@ -173,6 +173,11 @@
return value
end
+ # Allow ranges + */2
+ if value =~ /^[0-9]+-[0-9]+\/[0-9]+$/
+ return value
+ end
+
if value == "*"
return value
end
@@ -268,10 +273,10 @@
def alpha
%w{sunday monday tuesday wednesday thursday friday
saturday}
end
- self.boundaries = [0, 6]
+ self.boundaries = [0, 7]
desc "The weekday on which to run the command.
- Optional; if specified, must be between 0 and 6,
inclusive, with
- 0 being Sunday, or must be the name of the day (e.g.,
Tuesday)."
+ Optional; if specified, must be between 0 and 7,
inclusive, with
+ 0 (or 7) being Sunday, or must be the name of the day
(e.g., Tuesday)."
end
newproperty(:month, :parent => CronParam) do
Luke > I'm note trying to make longer weeks (though having two sundays
might be quite cool). :-)
Here's an excerpt from vixie-cron's crontab(5) page:
======================
The time and date fields are:
field allowed values
----- --------------
minute 0-59
hour 0-23
day of month 1-31
month 1-12 (or names, see below)
day of week 0-7 (0 or 7 is Sun, or use names)
======================
Using 7 for sunday is probably more of an european thing.
Thanks,
Calimero
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---