Issue #4820 has been updated by Nigel Kersten.

Keywords set to cronfixit


----------------------------------------
Feature #4820: cron type should not allow specification of special parameter 
and normal hour/minute/day/etc parameters.
https://projects.puppetlabs.com/issues/4820

Author: micah -
Status: Accepted
Priority: Normal
Assignee: 
Category: cron
Target version: 
Affected Puppet version: 
Keywords: cronfixit
Branch: 


As it is now, if you specify a 'special' parameter to the cron provider, while 
*also* providing other hour/minute/day/etc parameters, only the special 
parameter is applied:

<pre>
# cat /tmp/test_special_cron.pp
cron { "test_special":
         command => "/bin/true",
         hour => "*/6",
         special => "reboot";
}
# puppet /tmp/test_special_cron.pp
notice: /Stage[main]//Cron[test_special]/ensure: created
# crontab -l
# HEADER: This file was autogenerated at Wed Sep 22 11:02:54 -0400 2010 by 
puppet.
# HEADER: While it can still be managed manually, it is definitely not 
recommended.
# HEADER: Note particularly that the comments starting with 'Puppet Name' should
# HEADER: not be deleted, as doing so could cause duplicate cron jobs.
# Puppet Name: test_special
@reboot /bin/true
</pre>

You will notice that *only* the "@reboot" line was added, when I clearly also 
specified "hour => */6". 

Since cron specials typically do not conflict with a regular cron entry, I was 
expecting two cron entries to be made, one for the @reboot, and one for the */6 
hourly. 

I can understand the argument that you might want people explicitly specify 
separate cron resources, and not let people do this. If that is what you 
prefer, then I would change my bug report to request that you notify the user 
somehow that they've specified a parameter that will not be applied.



-- 
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to