From fce5dcd8a5dd477b2451d26cccae1c39d9b27725 Mon Sep 17 00:00:00 2001 From: Vitaly Samigullin Date: Sun, 3 Sep 2023 18:23:17 +0200 Subject: [PATCH] Update docs --- CHANGELOG.md | 6 ++++++ CONTRIBUTING.md | 1 - docs/usage.md | 16 +++++++++++++++- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fe4609..7ba015d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ file. This change log follows the conventions of ## [Unreleased] +### Added + +- Subcommand `schedule explain ` to explain a given `crontab` + in plain English + ([#102](https://github.com/pilosus/dienstplan/issues/102)) + ## [1.1.90] - 2023-08-03 ### Added diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f8375c4..8d9bad8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -47,7 +47,6 @@ make all 5. Update current tag mentions in `README.md`: -- Docker version - Usage examples 6. After release preparation, add a tag with `git tag X.Y.Z` diff --git a/docs/usage.md b/docs/usage.md index a1eee95..0ee5076 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -144,7 +144,7 @@ A meta-command to create, delete or list schedules. where: -- `` is one of: `[create, delete, list]` +- `` is one of: `[create, delete, list, explain]` - `""` is a command for a bot to run on schedule - `` is a crontab file line in [vixie-cron](https://man7.org/linux/man-pages/man5/crontab.5.html) @@ -182,6 +182,20 @@ List all the schedules in the channel: @dienstplan schedule list ``` +#### Explain + +Explain a given `crontab` in plain English, e.g.: + +``` +@dienstplan schedule explain 0 22 * */2 Mon-Fri +``` + +returns: + +``` +Crontab `0 22 * */2 Mon-Fri` means the executable will be run at minute 0, past hour 22, on every day of week from Monday through Friday, in every 2nd month +``` + ### Help Show a help message for the bot: