Feature #10328

Schedule type should support selecting days of the week

Added by Sean Millichamp 7 months ago. Updated 7 days ago.

Status:Merged - Pending Release Start date:10/27/2011
Priority:Normal Due date:
Assignee:Sean Millichamp % Done:

0%

Category:schedule
Target version:3.0.0
Affected Puppet version:development Branch:master
Keywords:schedule weekday
Votes: 0

Description

The schedule type should support the ability to select which days of the week the schedule would be considered valid.

The use case where this would be for a system that has a limited change window to a particular day of the week. For example, a production system which only has a change window from midnight to 6 AM Saturday and Sunday should be able to express a schedule similar to:

schedule { ‘production_change’:

range => '00:00:00 - 06:00:00',
weekday => [ 'Sat', 'Sun' ],

}

Right now there is no simple way to express such a change window in Puppet, adding support to the schedule type seems like the most appropriate approach.

I propose adding a “weekday” parameter to the schedule type. It would take either a string or an array of strings containing the days of the week in which the schedule is valid.

I have a patch that is almost finished implementing this that I can push to Github if the idea is approved.

History

Updated by Sean Millichamp 7 months ago

  • Status changed from Unreviewed to In Topic Branch Pending Review
  • Assignee set to Sean Millichamp
  • Keywords set to schedule weekday

Patch with tests in Github pull-request:

Commit: https://github.com/seanmil/puppet/commit/0f9a82a89f89764621d03008d13a7602c4503bf5

Pull: https://github.com/puppetlabs/puppet/pull/184

Updated by Patrick Otto 4 months ago

  • Target version set to 2.7.x

Updated by Daniel Pittman 4 months ago

  • Status changed from In Topic Branch Pending Review to Merged - Pending Release
  • Target version changed from 2.7.x to 3.X

Thanks for the submission; I have merged that for the next major release.

Updated by Daniel Pittman 7 days ago

  • Target version changed from 3.X to 3.0.0

Also available in: Atom PDF