Schedule¶
Synopsis¶
kbolt schedule add [OPTIONS]
kbolt schedule status
kbolt schedule remove [ID | --all | --space <SPACE> [--collection <COLLECTIONS>]]
What schedule does¶
schedule runs the same indexing work as kbolt update, but on a periodic trigger.
For directories you edit regularly, prefer kbolt watch enable. Use schedules when you want predictable batch refreshes, for example on archive collections or machines where a long-running watcher is not the right fit.
The scope determines what gets updated:
- no
--space: all spaces --space work: everything in theworkspace--space work --collection api,docs: only those collections inwork
add¶
Use add to create a new schedule.
Trigger forms¶
Interval trigger:
Daily trigger:
Weekly trigger:
Scope options¶
--space <SPACE>: restrict the schedule to one space--collection <COLLECTIONS>: restrict the schedule to specific collections; requires--space
Examples:
kbolt schedule add --every 30m
kbolt schedule add --at 09:00 --space work
kbolt schedule add --on Mon,Fri --at 09:00 --space work --collection api,docs
Validation rules¶
--everyaccepts only minute or hour intervals such as30mor2h- interval schedules must be at least
5m - daily and weekly times must parse as a valid time
- weekly schedules require at least one weekday
--collectionrequires--space- the top-level
--spaceflag is rejected; pass--spacetoschedule addorschedule removeinstead - you cannot add two schedules with the same trigger and scope
status¶
Use status to inspect configured schedules and their last run state:
Each entry shows:
- the schedule ID, such as
s1 - the trigger
- the scope
- the backend
- the current state
last_startedlast_finishedlast_resultlast_errorwhen the last run failed
State values:
installed: the configured schedule is installed on the current backenddrifted: the configured schedule exists inschedules.toml, but the backend installation no longer matches ittarget_missing: the schedule points at a space or collection that no longer exists
If a schedule is drifted, remove it by ID and add it again so kbolt can replace the backend entry.
Last-result values:
success: the scheduled update finished successfullyskipped_lock: anotherkboltprocess already held the global operation lockfailed: the update run failed andlast_errorcontains the error message
status also reports orphans, which are backend schedule entries that no longer exist in the saved catalog.
A successful schedule add or schedule remove reconciles the managed backend state, so stale managed entries are cleaned up during the next change to the saved schedule set.
remove¶
Use remove to delete schedules:
You can also remove by scope:
Notes:
- scope-based removal succeeds only when the scope matches exactly one saved schedule
- if multiple schedules match the scope, remove by ID instead
Backend behavior¶
kbolt installs schedules on the native user-level scheduler for the current platform:
- macOS:
launchd - Linux:
systemd-user
If the current platform does not support scheduling, schedule commands fail.
schedule status compares the saved catalog with the installed backend entries, which is why it can report drifted schedules and orphans.