Issue #19198 has been updated by Charlie Sharpsteen.

Status changed from Closed to Duplicate

Flagging as a duplicate of #1453.

----------------------------------------
Bug #19198: cron Type doesn't update on Weekday removal
https://projects.puppetlabs.com/issues/19198#change-87771

* Author: Adam Carr
* Status: Duplicate
* 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.


Reply via email to