diff options
| author | Daniel Pittman <daniel@rimspace.net> | 2011-08-10 17:38:14 -0700 |
|---|---|---|
| committer | Daniel Pittman <daniel@rimspace.net> | 2011-08-10 17:38:14 -0700 |
| commit | f7e96953b4e297ac1f78a1747e8dc3187c49870b (patch) | |
| tree | a133a656944e9fdf508106f7def09e697d7edefc /lib/puppet | |
| parent | e5f43b06546b5cee49b6290068e22641ca3134eb (diff) | |
| parent | 0e0047393f869330979b5e0ca205f4667476379e (diff) | |
Merge pull request #28 from nfagerlund/ticket/2.6.x/3553_cron_requires_time
Ticket/2.6.x/3553 cron requires time
Diffstat (limited to 'lib/puppet')
| -rwxr-xr-x | lib/puppet/type/cron.rb | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/lib/puppet/type/cron.rb b/lib/puppet/type/cron.rb index 4f6ea733c..5367517b2 100755 --- a/lib/puppet/type/cron.rb +++ b/lib/puppet/type/cron.rb @@ -3,11 +3,12 @@ require 'facter' require 'puppet/util/filetype' Puppet::Type.newtype(:cron) do - @doc = "Installs and manages cron jobs. All fields except the command - and the user are optional, although specifying no periodic - fields would result in the command being executed every - minute. While the name of the cron job is not part of the actual - job, it is used by Puppet to store and retrieve it. + @doc = <<-EOT + Installs and manages cron jobs. Every cron resource requires a command + and user attribute, as well as at least one periodic attribute (hour, + minute, month, monthday, weekday, or special). While the name of the cron + job is not part of the actual job, it is used by Puppet to store and + retrieve it. If you specify a cron job that matches an existing job in every way except name, then the jobs will be considered equivalent and the @@ -18,30 +19,30 @@ Puppet::Type.newtype(:cron) do Example: cron { logrotate: - command => \"/usr/sbin/logrotate\", + command => "/usr/sbin/logrotate", user => root, hour => 2, minute => 0 } - Note that all cron values can be specified as an array of values: + Note that all periodic attributes can be specified as an array of values: cron { logrotate: - command => \"/usr/sbin/logrotate\", + command => "/usr/sbin/logrotate", user => root, hour => [2, 4] } - Or using ranges, or the step syntax `*/2` (although there's no guarantee that - your `cron` daemon supports it): + ...or using ranges or the step syntax `*/2` (although there's no guarantee + that your `cron` daemon supports these): cron { logrotate: - command => \"/usr/sbin/logrotate\", + command => "/usr/sbin/logrotate", user => root, hour => ['2-4'], minute => '*/10' } - " + EOT ensurable # A base class for all of the Cron parameters, since they all have |
