pilosus / dienstplan

Slack bot app for duty rotations
https://dienstplan-slack.pilosus.org
Other
21 stars 2 forks source link

[FEATURE] Explain crontab entry in schedule command in plain English #102

Closed pilosus closed 1 year ago

pilosus commented 1 year ago

Is your feature request related to a problem? Please describe. Crontab can be hard! Given the new kairos release's feature to explain crontab entry in plain English, it would be nice to reuse it in dienstplan.

Describe the solution you'd like

  1. When executing the command:
@dienstplan schedule create "who rota" 0 6,10-18/2,22 * * Mon-Fri

instead of the following bot response:

Executable who rota successfully scheduled with 0 6,10-18/2,22 * * Mon-Fri

I'd like to see an exaplanation too:

Executable who rota successfully scheduled with 0 6,10-18/2,22 * * Mon-Fri (it will be run at minute 0, past hour 6, every 2nd hour from 10 through 18, hour 22, on every day of week from Monday through Friday, in every month)
  1. We can add a dry-run too:
@dienstplan schedule explain 0 6,10-18/2,22 * * Mon-Fri
Schedule `0 6,10-18/2,22 * * Mon-Fri` mean the executable will be run at minute 0, past hour 6, every 2nd hour from 10 through 18, hour 22, on every day of week from Monday through Friday, in every month.

Describe alternatives you've considered Leave as it is now and let users shoot in their foot!