Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Feature Request: Add+ modifier for logical AND between day-of-month and day-of-week #205

Open
@Hexagon

Description

@Hexagon

Cronie follows the standard Vixie-cron behavior where a specified day-of-month and day-of-week are treated as alogicalOR. This means a job runs if either condition is met.

It would be very useful to have a pattern-specific way to switch this to alogicalAND. This would allow for schedules like "run on the 1st of the month only if it is also a Monday."

I've started an effort to make a detailed specification for existing and new features of cron, TheOCPS-project.

In increment 1.4 (draft), I've added a section on this, looking something like:


4.1.2. Explicit AND Logic (+ Modifier)

To provide a portable, unambiguous method for requiring both date conditions to be met, OCPS 1.4 introduces the+ (plus) modifier.

  • Functionality: When the+ character precedes the value in theDay of Week field, the logical combination for that specific pattern MUST be treated as a logicalAND.
  • Syntax:
    • The+ modifier is ONLY valid as the first character of theDay of Week field.
    • Its use in any other field or position MUST be treated as a parsing error.
  • Example (0 12 1 * +MON):
    • Default (OR)0 12 1 * MON: Triggers at noon on the 1st of the monthOR at noon on every Monday.
    • With+ Modifier0 12 1 * +MON: Triggers at noonONLY IF the 1st of the month is also a Monday.

+ is suggested over other alternatives like& and! for safety and clarity:& is a shell command modifier, and! commonly means NOT.

What do you think about this, could it be implemented in cronie?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp