Issue #22135 has been updated by Charlie Sharpsteen.
It is also worth noting that you may be able to achieve the behavior you want using [resource defaults](http://docs.puppetlabs.com/puppet/3/reference/lang_defaults.html): <pre> Cron { minute => '*', hour => '*', weekday => '*', monthday => '*', month => '*', } </pre> Then, all schedule components will be forced to `*` unless otherwise specified. ---------------------------------------- Bug #22135: Changing Cron in Module doesn't overwrite crontab entry correctly https://projects.puppetlabs.com/issues/22135#change-96293 * Author: Paul O'Connor * Status: Duplicate * Priority: Normal * Assignee: Charlie Sharpsteen * Category: * Target version: * Affected Puppet version: * Keywords: * Branch: ---------------------------------------- If I create a cron in Puppet like this: <pre> cron { 'Rotate carbon logs': command => '/opt/graphite/bin/carbon-logrotate.sh', user => root, hour => 1, minute => 15, } </pre> it will correctly add an entry in the crontab: <pre> 15 1 * * * /opt/graphite/bin/carbon-logrotate.sh </pre> If I then modify the Cron job to this: <pre> cron { 'Rotate carbon logs': command => '/opt/graphite/bin/carbon-logrotate.sh', user => root, hour => '*/1', } </pre> The cron job becomes this: <pre> 15 */1 * * * /opt/graphite/bin/carbon-logrotate.sh </pre> Notice that the 15 minutes is left in place but is not defined by Puppet. Using Puppet 3.2.2 on Master, 3.2.3 on Clients. -- 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. For more options, visit https://groups.google.com/groups/opt_out.
