Bug #3112

Problem with adding and removing crons

Added by Mark Mealman 7 months ago. Updated 7 months ago.

Status:Duplicate Start:01/26/2010
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:-
Target version:0.25.4
Affected version:0.25.3 Branch:
Keywords:
Votes: 0

Description

Here’s the cron in question:

    cron {
            upgrade_puppet:
            command => "/root/upgrade_puppet.sh",
            user    => root,
            hour    => 9,
            minute  => 10,
            ensure  => present
    }

Here’s the error produced by puppet:

debug: //base_ec2/Cron[upgrade_puppet]: Changing ensure debug: //base_ec2/Cron[upgrade_puppet]: 1 change(s) notice: //base_ec2/Cron[upgrade_puppet]/ensure: created debug: Flushing cron provider target root “–”:5: bad hour errors in crontab file, can’t install.

I was using cron bash scripts to upgrade puppet across 70 servers from 0.25.1 to 0.25.3. 0.25.1 can install, modify and remove the cron fine, but 0.25.3 throws this error.

Here’s the full crontab:

HEADER: This file was autogenerated at Mon Jan 25 16:31:33 -0500 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: backup_app

45 3 * * * /usr/local/bin/backup_app.pl

I can manually edit the crontab fine via ‘crontab -e’


Related issues

duplicates Puppet - Bug #2845: Cron entries using "special" parameter lose their title w... Closed 11/20/2009

History

Updated by Markus Roberts 7 months ago

  • Status changed from Unreviewed to Duplicate
  • Target version set to 0.25.4

Although the ticket history has gotten a little tangled, this is a duplicate (marked as #2845 but really it duplicates the problem caused by the first attempt to fix #2845). Fixed in 0.25.4, release candidates of which are available for testing (hint hint).

Also available in: Atom PDF