-
-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
I wonder if it might be nice to have a scheduler. Cron syntax is cryptic. A modern syntax might be nice.
Particularly with a built support for testing that your scheduled jobs ran at the correct time and with the correct permissions.
Something like
dshell schedule simulate 10:15 jobx.dart
This would run the scheduled job as if it was 10:15.
Other commands might be:
dshell schedule list
dshell schedule list <script.dart>
dshell schedule <script.dart> at 10:15
dshell schedule delete <n> - where <n> is a number output by list.
dshell schedule delete <script.dart> at 10:15
dshell schedule add <script.dart> interval 1 hour
dshell schedule add <script.dart> interval 1 hour, 30 seconds named backup
dshell schedule delete backup
The scheduled jobs would be stored in a configuration file under the ~/.dshell
Yaml would possible be a good target as it is already used in pubspec.yaml so would be familiar:
So maybe syntax like:
jobs:
/path/to/exe/or/script
name: backup
first_run: yyyy-mm-dd hh:MM:ss
re_occurs:
count: 1
or
forever
or
until: yyyy-mm-dd hh:MM:ss
interval:
seconds: 10
or
hours: 2
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed