Cron expressions are used in lots of places, but they're hard to read and misunderstanding them can be quite problematic.
This lint rule could detect cron expressions, and require the line above have a comment describing the expression accurately
export const someJobConfig = {
schedule: {cron: '0 * * * *'}
}
export const someOtherJobConfig = {
schedule: {cron: '*/15 8-18 * * 1-5'}
}
export const someJobConfig = {
// Every hour
schedule: {cron: '0 * * * *'}
}
export const someOtherJobConfig = {
// Every 15 minutes, between 08:00 AM and 06:59 PM, Monday through Friday
schedule: {cron: '*/15 8-18 * * 1-5'}
}
The library construe can parse these expressions and produce a human-readable equivalent. Violations could be auto-fixable.
If it could support yaml as well, it'd work with github actions workflows etc.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too