Hey Joey & Christian,
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!
Very cool guys. Thanks for the examples! This helps.
Best!
Tim
On Mon, Feb 2, 2015 at 6:00 PM, Joseph Karns <[email protected]> wrote:
> 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
> <https://groups.google.com/d/msgid/puppet-users/635da314-1901-49f1-bcbf-63bc73233262%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>
--
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/CAOZy0enge3jC3XT_fmYncy3WsXX%3DW7X8k54hBO%3D41WB_kqsXSQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.