Hello Tim:

Just like you would when manually adding a cronjob you should have '*/30', 
so your resource should look like this.

cron { "facts-cron":
  command => "/usr/bin/facter -y > /etc/mcollective/facts.yaml",
  user    => 'root',
  hour    => 0,
  minute  => '*/30'
}

Hope this helps!
Joey


On Monday, February 2, 2015 at 5:55:58 PM UTC-5, bluethundr wrote:
>
> Hey all,
>
> I'm attempting to setup a cron job via the cron resource in puppet. 
>
> This is what I'm trying to express via puppet:
>
> */30 * * * * /usr/bin/facter -y > /etc/mcollective/facts.yaml
>
> This is what I've tried:
>
> cron { "facts-cron":
>            command => "/usr/bin/facter -y > /etc/mcollective/facts.yaml",
>            user    => 'root',
>            hour    => 0,
>            minute  => '0/30'
>        }
>
> And this is the error I'm getting:
>
> Error: Failed to apply catalog: Parameter minute failed on 
> Cron[facts-cron]: 0/30 is not a valid minute at 
> /etc/puppet/environments/production/modules/mcollective/manifests/config.pp:18
> Wrapped exception:
> 0/30 is not a valid minute
>
> What's the best way to ask for a cron job to run every 30 minutes in 
> pupppet-ese?
>
> Thank you,
> Tim
>
> -- 
> GPG me!!
>
> gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
>
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/635da314-1901-49f1-bcbf-63bc73233262%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to