Skip to content

Tool Actions

The native_scheduler tool exposes 12 actions for full job lifecycle management. All actions share these common parameters:

ParameterTypeDescription
actionstring (required)One of the 12 actions below
backendstringauto (default), launchd, cron, systemd, windows-task-scheduler
namespacestringOverride the configured namespace

status

Returns backend detection info, current namespace, and data directory path.

Additional params: none

list

Lists all managed jobs for the current backend and namespace.

Additional params: none

get

Returns details for a single job.

ParameterTypeDescription
idstring (required)Job identifier

upsert

Creates or updates a job. The plugin materializes a wrapper runner and registers the job with the native scheduler.

ParameterTypeDescription
jobobject (required)Job definition (see below)

Job schema

FieldTypeDescription
idstring (required)Stable job identifier
descriptionstringHuman-readable description
commandstring[] (required)Executable followed by arguments
workingDirectorystringWorking directory for the script
environmentRecord<string, string>Environment variables
runAtLoadbooleanRun immediately when loaded (launchd)
startIntervalSecondsinteger (≥ 1)Simple recurring interval
calendarCalendarEntry[]Calendar schedule entries
stdoutPathstringPath for stdout log
stderrPathstringPath for stderr log
disabledbooleanWhether the job starts disabled
failureCallbackobjectAction on script failure
defaultFailureResultobjectResult to fire on crash/timeout

CalendarEntry

FieldTypeRange
minuteinteger0–59
hourinteger0–23
dayinteger1–31
weekdayinteger0–7 (0 and 7 = Sunday)
monthinteger1–12

failureCallback

Two types:

Command callback:

json
{
  "type": "command",
  "command": ["notify-send", "Job failed"],
  "environment": { "JOB_ID": "my-job" }
}

OpenClaw event callback:

json
{
  "type": "openclaw-event",
  "text": "Job failed — investigate",
  "mode": "now"
}

remove

Removes a job from the native scheduler and cleans up wrapper artifacts.

ParameterTypeDescription
idstring (required)Job identifier

run

Triggers an immediate execution of a job.

ParameterTypeDescription
idstring (required)Job identifier

enable

Enables a previously disabled job.

ParameterTypeDescription
idstring (required)Job identifier

disable

Disables a job without removing it.

ParameterTypeDescription
idstring (required)Job identifier

health

Returns health data for a job or all jobs in the namespace.

ParameterTypeDescription
idstringJob identifier. If omitted, returns health for all jobs

Health data includes success/failure counts, streaks, last run timestamp, and overall status.

last-run

Returns the most recent run status for a job.

ParameterTypeDescription
idstring (required)Job identifier

failures

Lists recent failure runs for a job.

ParameterTypeDescription
idstring (required)Job identifier
limitinteger (1–100)Max failures to return (default 10)

logs

Returns tail of stdout/stderr logs for a job.

ParameterTypeDescription
idstring (required)Job identifier
linesinteger (1–500)Number of log lines (default 50)