Issue #19198 has been updated by eric sorenson. Status changed from Unreviewed to Closed Assignee set to eric sorenson
The cron type doesn't manage fields you don't specify; it reads in the current definition and alters it only if any parameters __which you've specified__ are out of sync with the existing values. If you change your weekday parameter from a specific day to '*' you should see the behaviour you want. ---------------------------------------- Bug #19198: cron Type doesn't update on Weekday removal https://projects.puppetlabs.com/issues/19198#change-83102 Author: Adam Carr Status: Closed Priority: Normal Assignee: eric sorenson Category: Target version: Affected Puppet version: 3.1.0 Keywords: cron weekday Branch: Having had a Weekday listed within a cron definition, subsequent removal of that Weekday parameter left the weekday element of the implied cron set to its previous value. As an example the following definition produces the correct output in crontab: cron { myExampleCronJob: command => '/bin/echo "cheese" > /dev/null 2>&1', user => me, hour => 0, minute => 0, weekday => monday, } [root@myserver ~]$ crontab -l -u me # HEADER: This file was autogenerated... # Puppet Name: myExampleCronJob 0 0 * * 1 /bin/echo "cheese" > /dev/null 2>&1 Modifying the example and updating the server presents crontab distorted from the definitions intent: cron { myExampleCronJob: command => '/bin/echo "cheese" > /dev/null 2>&1', user => me, hour => 0, minute => 1, } [root@myserver ~]$ crontab -l -u me # HEADER: This file was autogenerated... # Puppet Name: myExampleCronJob 0 1 * * 1 /bin/echo "cheese" > /dev/null 2>&1 Where this should revert to: 0 1 * * * /bin/echo "cheese" > /dev/null 2>&1 -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-bugs?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
