Skip to content

Add Support for Cron Expression Aliases (@daily, @hourly, @weekly, etc.) #2

Description

@teesofttech

Description

CronCraft currently does not recognize shorthand cron aliases such as @hourly, @daily, @weekly, @monthly, @yearly, and @reboot. These are widely used in Unix/Linux cron and many scheduling libraries.

Expected Behavior

"@daily".ToHumanReadable(settings);   // → "Every day at 12:00 AM"
"@hourly".ToHumanReadable(settings);  // → "Every hour"
"@weekly".ToHumanReadable(settings);  // → "Every Sunday at 12:00 AM"
"@monthly".ToHumanReadable(settings); // → "Every month on the 1st at 12:00 AM"
"@yearly".ToHumanReadable(settings);  // → "Every year on January 1st at 12:00 AM"
"@reboot".ToHumanReadable(settings);  // → "At system reboot"

Alias Mapping

Alias Equivalent Cron
@hourly 0 * * * *
@daily 0 0 * * *
@weekly 0 0 * * 0
@monthly 0 0 1 * *
@yearly 0 0 1 1 *
@reboot (special case)

Where to Look

  • CronCraft/Extensions/CronHelper.csConvertQuartzToCronos is a good place to expand with alias normalization before the 5-part parse step.

Acceptance Criteria

  • All aliases listed above are recognized and normalized
  • @reboot returns a meaningful string (e.g., "At system reboot")
  • Unit tests cover each alias
  • Localized aliases work in English, Spanish, and French

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions