Ask Your Question

The repeat attribute of the schedule resource does not evaluate.

asked 2017-08-25 07:29:11 -0600

btoohey gravatar image

In the following code the repeat attribute is not evaluated:

  schedule { "publish_sched" :
    range   => "12:10 - 13:00",
    weekday => "Thursday",
    repeat  => 1,

    notify { "test message" :
      schedule => "publish_sched",

This code produces the notify message during the specified range and weekday but does not apply the repeat => 1, specification. It repeats as many times as puppet runs during that period. The documentation even states that the default for repeat is 1.

This is puppet 3.6.2 (master and client) running on RedHat 6.

edit retag flag offensive close merge delete


`repeat` sets a _maximum_ limit.

Kai Burghardt gravatar imageKai Burghardt ( 2017-08-25 08:09:15 -0600 )edit

If I understand that correctly, then this code should only execute the notify once during the period. But in reality it repeats as many times as puppet runs during this period. And that is the issue I cannot get around.

btoohey gravatar imagebtoohey ( 2017-08-25 08:24:38 -0600 )edit

1 Answer

Sort by » oldest newest most voted

answered 2017-08-26 07:16:53 -0600

updated 2017-08-26 07:17:59 -0600

You gotta specify the period attribute, too.

schedule { 'publish_sched':
  weekday => 'Thursday',
  range   => '12:10 - 13:00',
  repeat  => 1,
  period  => 'weekly',

period => 'weekly' makes Puppet remember any application of a resource for up to a week. After a week the “tally chart” is cleared and resources may get applied up to repeat times again.

As far as I understand the documentation, without specifying the period attribute, Puppet does not start counting, hence repeat doesn't show any effect. Quote: “The default is for resources to get applied every time Puppet runs.”

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2017-08-25 07:29:11 -0600

Seen: 98 times

Last updated: Aug 26 '17