> ## Documentation Index
> Fetch the complete documentation index at: https://orbit.nckrtl.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# schedule

> Create, run, inspect, enable, and remove recurring commands that native systemd timers execute on a Node or an Instance, and record Project-owned Schedule definitions.

A Schedule runs one command on a native systemd timer for a Node or an Instance. The `schedule` family creates Schedules, runs them by hand, reads their logs, enables a stopped timer, and removes them. It also records Project Schedule definitions.

[Schedules](/docs/reference/schedules) describes the fields, the execution context, the host artifacts, and the error codes. [Processes and schedules](/docs/reference/processes-and-schedules) describes Project definitions and their Instance copies.

## Choose the owner

`schedule:create` needs exactly one selector. The CLI refuses two selectors, no selector, `--for` without `--project`, and `--no-start` with `--node` before it sends a request.

| Selector | Owner | Result |
| - | - | - |
| `--node=ID` | Node | The command runs as the Node's managed user. The timer installs enabled. |
| `--instance=ID` | Instance | The command runs as the Instance's runtime user in its checkout or `current` release. The timer can install disabled. |
| `--project=ID --for=production` | Project definition | The Gateway records a definition. Production preparation copies it into a stopped Instance Schedule. |

`schedule:list`, `schedule:show`, `schedule:update`, and `schedule:destroy` take `--project` to work on definitions. `schedule:run`, `schedule:logs`, and `schedule:enable` take the UUID of an installed Schedule.

## Commands

| Command | Result |
| - | - |
| [`schedule:create`](#orbit-schedulecreate) | Create one Node or Instance Schedule, or record one Project definition. |
| [`schedule:list`](#orbit-schedulelist) | List the Schedules you may address, or one Project's definitions. |
| [`schedule:show`](#orbit-scheduleshow) | Show one Schedule or one definition. |
| [`schedule:update`](#orbit-scheduleupdate) | Replace one Project Schedule definition. |
| [`schedule:run`](#orbit-schedulerun) | Run one Schedule now without changing its timer. |
| [`schedule:logs`](#orbit-schedulelogs) | Return the newest journal lines. |
| [`schedule:enable`](#orbit-scheduleenable) | Enable and start an Instance Schedule timer. |
| [`schedule:destroy`](#orbit-scheduledestroy) | Remove one Schedule or one definition. |

Every command accepts `--json`. Output shows `desired_timer_state` apart from the lifecycle `status`, and every result includes the request ID. `schedule:destroy` asks for confirmation, and the default is No.

## orbit schedule:create

Create one Schedule for a Node or an Instance, or record a Project Schedule definition.

```bash theme={"dark"}
orbit schedule:create <name> (--node=ID | --instance=ID | --project=ID --for=production) --calendar=CALENDAR --command=COMMAND [options]
```

| Argument | Required | Meaning |
| - | - | - |
| `name` | yes | 1 through 63 lowercase ASCII letters or digits, with hyphens only between them. Unique within the owner. |

| Option | Default | Meaning |
| - | - | - |
| `--node=ID` | none | Positive Node ID. |
| `--instance=ID` | none | Positive Instance ID. |
| `--project=ID` | none | Numeric Project ID for a definition. |
| `--for=production` | none | Definition environments. Required with `--project`. Only definitions for `production` are copied. |
| `--calendar=CALENDAR` | none | A systemd calendar expression of at most 255 printable ASCII bytes, such as `daily`, `hourly`, or `Mon..Fri 02:00`. |
| `--command=COMMAND` | none | One non-empty line of at most 4,096 bytes. |
| `--timeout=SECONDS` | `3600` | Execution timeout, 1 through 86,400 seconds. |
| `--no-start` | off | Install an Instance Schedule with its timer disabled and stopped. |

The CLI checks the name, calendar, command, and timeout before it sends a request. The host Node's `systemd-analyze calendar` then accepts or refuses the calendar. A definition has no host yet, so that check runs when production preparation copies the definition.

```bash theme={"dark"}
orbit schedule:create daily-report --node=7 --calendar=daily --command='php report.php'
orbit schedule:create hourly-report --instance=12 --calendar=hourly --command='php artisan report:send' --no-start
orbit schedule:create hourly-report --project=1 --for=production --calendar=hourly --command='php artisan report:send' --timeout=600
```

## orbit schedule:list

List the Schedules whose target Node you may address, without command text, or the definitions of one Project.

```bash theme={"dark"}
orbit schedule:list [--project=ID] [--json]
```

## orbit schedule:show

Show one Schedule with its command, `desired_timer_state`, `last_run_at`, and `last_run_status`, or one definition by name.

```bash theme={"dark"}
orbit schedule:show <schedule> [--project=ID] [--json]
```

| Argument | Required | Meaning |
| - | - | - |
| `schedule` | yes | Schedule UUID, or the definition name with `--project`. |

## orbit schedule:update

Replace one Project Schedule definition with a complete specification. The change affects later copies only.

```bash theme={"dark"}
orbit schedule:update <name> --project=ID --for=production --calendar=CALENDAR --command=COMMAND [--timeout=SECONDS] [--json]
```

## orbit schedule:run

Start the Schedule's service once and return at once. The timer state does not change. A failed start returns `schedule.run_failed`.

```bash theme={"dark"}
orbit schedule:run <uuid> [--json]
```

## orbit schedule:logs

Return the newest complete lines of the Schedule's service journal. `schedule` is the UUID of an installed Schedule.

```bash theme={"dark"}
orbit schedule:logs <schedule> [--lines=COUNT] [--json]
```

| Option | Default | Meaning |
| - | - | - |
| `--lines=COUNT` | `100` | 1 through 1,000 lines. |

The Gateway returns at most 1 MiB and sets `truncated` when that limit removed older lines.

## orbit schedule:enable

Enable and start the timer of one Instance Schedule. The command is idempotent. Use it after `schedule:create --no-start`, or for a copy that production preparation installed stopped. `schedule` is the UUID of an installed Schedule.

```bash theme={"dark"}
orbit schedule:enable <schedule> [--json]
```

## orbit schedule:destroy

Remove one Schedule, or one definition by name.

```bash theme={"dark"}
orbit schedule:destroy <schedule> [--project=ID] [--yes] [--json]
```

| Option | Meaning |
| - | - |
| `--project=ID` | Select a definition by name. |
| `--yes` | Confirm without a prompt. A JSON or non-interactive call without `--yes` returns `input.confirmation_required`. A declined prompt, Ctrl-C, or EOF returns `input.cancelled`. |

<Warning>
  Destroy disables the timer first. When the command is still running, the Schedule stays `removing`. Run `schedule:destroy` again after the command ends to finish the removal.
</Warning>

Destroying a definition leaves every existing Instance copy in place.

## Related

* [`process`](/docs/cli/process) manages long-running services. Process commands do not operate on Schedules.
* [`doctor`](/docs/cli/doctor) with `--family=schedule` reports Schedule drift.
* [`instance:destroy`](/docs/cli/instance#orbit-instancedestroy) removes every Schedule of the Instance.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.