How to setup Puppet agent run interval at a specific time?

1,207 views
Skip to first unread message

staceyt...@gmail.com

unread,
Mar 26, 2015, 9:06:03 AM3/26/15
to puppet...@googlegroups.com
Hi all,

I am using puppet 3.7.3.

I want my puppet agent to run twice a day, so in puppet.conf, I set runinterval:

#  This setting can be a time interval in seconds (30 or 30s), minutes (30m), hours (6h), days(2d), or years (5y)
     runinterval = 12h

However, how could I setup the puppet agent run to happen at a specific time?
For example, 2:00am and 2:00pm respectively?

Now it seems random. And whenever the machine is rebooted, it will run puppet agent.

Thanks,
Zaiwen

Christopher Wood

unread,
Mar 26, 2015, 9:28:11 AM3/26/15
to puppet...@googlegroups.com
Set your puppet agent to not start as boot, and have a cron job starting an agent run at the desired time.

Make sure you don't have too many agents hitting your puppetmaster simultaneously, the fqdn_rand() function will help here.

> Thanks,
> Zaiwen
>
> --
> 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 [1]puppet-users...@googlegroups.com.
> To view this discussion on the web visit
> [2]https://groups.google.com/d/msgid/puppet-users/c97554da-5967-41d9-8943-50e5750f8ab5%40googlegroups.com.
> For more options, visit [3]https://groups.google.com/d/optout.
>
> References
>
> Visible links
> 1. mailto:puppet-users...@googlegroups.com
> 2. https://groups.google.com/d/msgid/puppet-users/c97554da-5967-41d9-8943-50e5750f8ab5%40googlegroups.com?utm_medium=email&utm_source=footer
> 3. https://groups.google.com/d/optout

Garrett Honeycutt

unread,
Mar 26, 2015, 10:09:43 AM3/26/15
to puppet...@googlegroups.com
Hi Zaiwen,

The easiest way to manage when and how your agent runs is through cron.
Highly recommend running in that fashion.

Best regards,
-g
--
Garrett Honeycutt
@learnpuppet
Puppet Training with LearnPuppet.com
Mobile: +1.206.414.8658

staceyt...@gmail.com

unread,
Mar 26, 2015, 11:23:52 AM3/26/15
to puppet...@googlegroups.com
Thanks a lot for the reply. I will implement a cron job for that.
Reply all
Reply to author
Forward
0 new messages