Bug #2293

cron syntax X-Y/Z and '7' for sunday

Added by Calimero Calimero almost 3 years ago. Updated almost 3 years ago.

Status:Closed Start date:05/22/2009
Priority:Normal Due date:
Assignee:James Turnbull % Done:

0%

Category:cron
Target version:0.25.0
Affected Puppet version:0.24.8 Branch:
Keywords:cron range sunday weekday
Votes: 0

Description

Hi,

We’re moving to puppet and we have to migrate a few hundreds of cronjobs.

We’ve stumbled upon two small issues in puppet 0.24.8 which is a bit too strict regarding what parameters the Cron resource accepts.

1/ Syntax ‘X-Y/Z’ is not accepted, only ‘*/Z’ but we have jobs with ‘1-59/2’ and the like

2/ Sunday is expected to be numbered 0 although vixie-cron (shipped with CenOS) supports both 0 and 7.

So we wrote the attached patch. But I would understand puppet being picky for cross-platform compatibility reasons.

Hope it helps. :–)

puppet-0.24.8-cron.patch - patch rev.2 (1.1 kB) Calimero Calimero, 05/22/2009 09:30 am

puppet-0.24.8-cron.r3.patch (1.2 kB) Calimero Calimero, 05/27/2009 07:55 am

History

Updated by Calimero Calimero almost 3 years ago

  • File deleted (puppet-0.24.8-cron.patch)

Updated by Calimero Calimero almost 3 years ago

Calimero Calimero wrote:

So we wrote the attached patch. But I would understand puppet being picky for cross-platform compatibility reasons.

Updated patch: I had forgotten to update associated inline comments/messages.

Updated by James Turnbull almost 3 years ago

  • Status changed from Unreviewed to Needs Decision
  • Assignee set to Luke Kanies
  • Target version set to 0.25.0

Updated by Luke Kanies almost 3 years ago

  • Status changed from Needs Decision to Accepted
  • Assignee changed from Luke Kanies to Calimero Calimero

Can you send the patch to the -dev list for code review?

Updated by Luke Kanies almost 3 years ago

  • Target version changed from 0.25.0 to 4

And we’ll set the target version once the code’s gone through review.

Updated by Calimero Calimero almost 3 years ago

Calimero Calimero wrote:

Updated patch: I had forgotten to update associated inline comments/messages.

Again… comment / description I missed to update…

Updated by James Turnbull almost 3 years ago

  • Target version changed from 4 to 0.25.0

From memory this code was accepted.

Updated by James Turnbull almost 3 years ago

  • Assignee changed from Calimero Calimero to James Turnbull

Updated by James Turnbull almost 3 years ago

  • Status changed from Accepted to Closed

Pushed in commit:aaca17a26092f3fece9a835eddf3ad6b9cf82300 in branch master.

Also available in: Atom PDF