Skip to content

CLI Tool rails-crons #9

@niteshpurohit

Description

@niteshpurohit

Feature Request

Description

Provide a CLI that offers cron explanation, next fire times, and ad-hoc command execution bound to cron schedules.

Use Case

Quickly test and explore cron expressions without loading a Rails app.

Proposed Solution

  • Implement CLI (Thor/GLI) with commands:
    • explain "<expr>" → human text
    • next "<expr>" --count N → N upcoming times (UTC/local toggle)
    • run "<expr>" -- cmd "echo 'tick'" → execute command at matching times (single-run mode)
  • Packaged as exe/rails-crons executable.

Alternatives Considered

Rake-only interfaces — CLI preferred for non-Rails users.

Additional Context

Ensure robust error messages and non-zero exit codes for invalid inputs.

Checklist

  • I have searched for a similar feature request and didn't find any duplicates.
  • I have included all the required information.
  • I have tagged the issue with the label "enhancement".

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions