Skip to content

Conversation

JoshVanL
Copy link
Contributor

Adds a dapr scheduler export command to export the current scheduler
state to a file, and a dapr scheduler import command to import a
previously exported scheduler state from a file. This is useful for
backing up and restoring the scheduler state.

dapr scheduler export --output-file scheduler_backup.bin
dapr scheduler import --input-file scheduler_backup.bin

Adds `dapr scheduler list` which a new CLI command to list the jobs
which are in scheduler. Lists both app Jobs and actor reminders. Works
for both standalone and Kubernetes modes.

The jobs can be filtered by namespace with `-n ...`, as well as by job
target type `--filter-type={all, job, actorreminder}`. Defaults to all.

Supports output formats (`-o`) `short`, `wide`, `json` and `yaml`.
Defaults to `short`. `json` and `yaml` output formats are _not_
importable formats.

Fixes the table output prints to remove empty space at the start of
rows.

Adds e2e standalone tests for this new command.

```
$ dapr scheduler list
NAMESPACE  APP ID                                NAME   TARGET  BEGIN                 COUNT  LAST TRIGGER
default    275c7268-9011-4796-8b06-1ed53358eebf  test1  job     2025-09-18T01:06:28Z  170    2025-09-18T01:09:18Z
default    275c7268-9011-4796-8b06-1ed53358eebf  test2  job     2025-09-18T02:06:28Z  0
```

Signed-off-by: joshvanl <[email protected]>
Signed-off-by: joshvanl <[email protected]>
Signed-off-by: joshvanl <[email protected]>
Signed-off-by: joshvanl <[email protected]>
Signed-off-by: joshvanl <[email protected]>
Signed-off-by: joshvanl <[email protected]>
Adds `dapr scheduler delete` which is a new CLI command to delete jobs
and actor reminders which are stored in scheduler. You can delete
multiple jobs at a time, or all jobs registered in a namespace.
The target namespace is required.

The given name encode the job target type in the string:

```
"job/<app-id>/<job-name>" for jobs
"actorreinder/<actor-type>||<actor-id>||<reminder-name>" for actor reminders
```

```
dapr delete -n foo job/foo/bar
dapr delete -n foo actorreminder/MyActor||1234||reminder1
dapr delete -n foo --delete-all-yes-i-know-what-i-am-doing
```

Signed-off-by: joshvanl <[email protected]>
Adds a `dapr scheduler export` command to export the current scheduler
state to a file, and a `dapr scheduler import` command to import a
previously exported scheduler state from a file. This is useful for
backing up and restoring the scheduler state.

```
dapr scheduler export --output-file scheduler_backup.bin
dapr scheduler import --input-file scheduler_backup.bin
```

Signed-off-by: joshvanl <[email protected]>
@olitomlinson
Copy link

@JoshVanL maybe add some fine grained filters so that users could only export specifics, rather than the whole state.

e.g. export reminders relating to a particular Workflow App ID, or Actor Type, that kind of thing?

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

Successfully merging this pull request may close these issues.

2 participants