Skip to content

fix(cron): support a single named month in expressions#799

Merged
thelindat merged 1 commit into
overextended:mainfrom
ASTROWwwW:fix/cron-named-month
Jun 18, 2026
Merged

fix(cron): support a single named month in expressions#799
thelindat merged 1 commit into
overextended:mainfrom
ASTROWwwW:fix/cron-named-month

Conversation

@ASTROWwwW

Copy link
Copy Markdown
Contributor

Problem

A single named month (e.g. jan) never runs. parseCron returns it as the string "1", which getTimeUnit can't match (not a step/range/list) → returns false → the task is stopped. Numeric (1) and lists (jan,feb) work fine.

Reproduce

lib.cron.new('* * * jun *', fn) -- never runs (named, current month)
lib.cron.new('* * * 6 *',   fn) -- runs (numeric)

Fix

Return a number for a single parsed month so it takes the numeric path:

@thelindat thelindat merged commit 6ee7a26 into overextended:main Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants