The Puppet Labs Issue Tracker has Moved:

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using See the following page for information on filing tickets with JIRA:

Bug #12653

schedule metaparameter ignored in defined type

Added by Chip Schweiss about 4 years ago. Updated over 2 years ago.

Status:Needs More InformationStart date:02/15/2012
Priority:NormalDue date:
Assignee:-% Done:


Target version:-
Affected Puppet version:2.6.12 Branch:
Keywords:define, schedule

We've Moved!

Ticket tracking is now hosted in JIRA:


I have defined:

define yumgroup($ensure = "present", $optional = false) {
    case $ensure {
        present,installed: {
            $pkg_types_arg = $optional ? {
                true => "--setopt=group_package_types=optional,default,mandatory",
                default => ""
            exec { "Installing $name yum group":
                command => "yum -y groupinstall $pkg_types_arg $name",
                unless => "yum -y groupinstall $pkg_types_arg $name --downloadonly",
                timeout => 600,
                require => Package["yum-plugin-downloadonly"];

and call it with:

yumgroup {
    ensure => present,
    schedule => 'daily',

The schedule is ignored and runs every time. If I add the schedule to the exec in the defined method it works as expected.

12653.pp (1.03 KB) Chris Price, 02/21/2012 01:38 pm


#1 Updated by Chris Price about 4 years ago

  • Status changed from Unreviewed to Investigating
  • Assignee set to Chris Price

#2 Updated by Chris Price about 4 years ago

  • File 12653.pp added
  • Status changed from Investigating to Needs More Information
  • Assignee deleted (Chris Price)

Spent a little while trying to reproduce this, and didn’t have success.

I’ve attached a little manifest that shows some “schedule” metaparams working successfully with “defines”. In one of the defines I used a case statement, wondering if that could be what was causing your issue. They all seem to be behaving just as I’d expect.

I’ve tested this with 2.6.12 and master.

Perhaps you could experiment with this manifest and let us know whether it works for you? If it does, then perhaps there is still something different that your manifest is triggering that I didn’t tickle with this one.

#3 Updated by John Julien almost 3 years ago

This bug appears to only trigger when the schedule and define are part of a class rather than an in-line manifest like the one Chris attached.

The schedule is ignored in the following code (Tested on 2.7.16):

class myclass {
  schedule { 'never':
    period => never,

  define foodefine::sub ($foomessage) {
    notify { "FOODEFINE: $name $foomessage": }

  foodefine::sub { "should not execute":
    foomessage => 'never',
    schedule => 'never',

include myclass

#4 Updated by Jan Doleschal over 2 years ago


the Bug occurs in puppet 3.2.4 too.

Also available in: Atom PDF