Implement a scheduler
Nobody has claimed this yet.
- Dominant language
- Dart
- Stars
- 265
- Forks
- 30
- PR merge metrics
- No merged PRs in 30d
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing CLI entry points and how pubspec.yaml uses YAML; the issue names no specific files or tests. The scope would need agreement around the proposed schedule commands, ~/.dshell storage, simulation, permissions, and recurrence behavior before completion can be assessed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, yaml
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100