Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Human readable text that explains a given crontab string #3

Closed
pilosus opened this issue Jul 29, 2023 · 0 comments
Closed
Assignees

Comments

@pilosus
Copy link
Owner

pilosus commented Jul 29, 2023

It would be cool to generate a string explaining in English a given crontab, e.g.

  1. */10 * * 1-6 Mon-Fri => at every 10th minute past every hour on every day of week from Monday through Friday in every month from January through June
  2. 0,15,30 9,12,21 */5 * * => at minute 0, 15, 30 past hour 9, 12, 21 on every 5th day of month
  3. 0,7,15,*/12,*/14,57-59 * * * * => at minute 0, 7, 15, every 12th minute, every 14th minute, and every minute from 57 through 59
  4. * * 1,3-7,*/10 * 1,2,*/3,5-7 => at every minute past every hour on day of month 1, every day of month from 3 through 7, and every 10th day of month or on Monday, Tuesday, every 3rd day of week, and every day of week from Friday through Sunday

So, the format is roughly:

at [concrete value(s), range(s), frequency(ies)][minute] 
past [concrete value(s), range(s), frequency(ies)][hour] 
on [concrete value(s), range(s), frequency(ies)][day of month] or [concrete value(s), range(s), frequency(ies) [day of week]
in [concrete value(s), range(s), frequency(ies)][month]

Values concatenations:

  • concrete values a,b,c,d => a, b, c, d
  • ranges 1-5 => from 1 though 5; Mon-Fri => from Monday through Friday
  • frequencies */5 => every 5th
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

No branches or pull requests

1 participant