schedule.pause
Synopsis
schedule.pause <id>... [name: value]...
Description
schedule.pause marks the selected active schedules as paused in one
operation of the journal and returns one effect record per selected
schedule. A paused schedule keeps its definition and history and makes no
runs; run times that pass while it is paused are not made up. A run in
progress is not stopped.
Only schedules in the state active change. Paused, completed and expired
schedules are reported with action: unchanged and their state in before,
and no file is written for them.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
id |
list<text> |
none | Schedules to pause. |
all |
bool |
false |
Pause all schedules. |
Input and output
| Form | Input | Output |
|---|---|---|
| default | none |
effect |
The effect record has kind: schedule.pause, target: schedule:<id>,
action (pause or unchanged), before with the previous state and
after with the new state.
Effect
| Property | Value |
|---|---|
| Category | change |
| Effect | local |
| Reversibility | reversible |
| Implementation | builtin |
Examples
Pause one schedule:
schedule.pause "s2"
Pause two schedules in one operation:
schedule.pause ["s2", "s4"]
Pause every schedule, for example before maintenance of the device:
schedule.pause all: true
Errors
| Code | Meaning | Typical fix |
|---|---|---|
E_MISSING_PARAM |
Neither id nor all: true is given. |
Give the identifiers or all: true. |
E_PARAM_CONFLICT |
id and all: true are given together. |
Keep one of them. |
E_NOT_FOUND |
Some identifiers do not exist; actual lists them. Nothing is changed. |
Correct the identifiers; schedule.list shows the existing ones. |
E_INVALID_VALUE |
An identifier contains characters other than letters, digits, - and _. |
Give identifiers such as s3. |
E_IO |
The schedule store cannot be written. | Check the permissions of the state directory. |
Related
schedule.resume resumes paused schedules; schedule.list state: paused
lists them.