# Background jobs, tasks and schedules in Edith

> See Edith's background jobs and tasks in Settings > About, run or stop them, and submit durable tasks and scheduled commands with ed run.

- Canonical URL: https://getedith.pro/docs/background-jobs
- Updated: 2026-12-03

Edith keeps a small background helper running so your tools can refresh data, watch folders and finish long tasks while the window is closed. You can watch and control that work in the app. From the terminal you can also hand it your own commands as durable tasks, schedule commands on an interval or a cron rule, and wrap long commands so their output is kept.

## See background work in the app

1. Open **Settings > About**.
2. Next to **Diagnostics**, press **Show diagnostics**.

Diagnostics shows:

- **The background helper.** Whether it is running, how long it has been running, and a **Restart** button (or **Start** when it is stopped).
- **Scheduled jobs**, grouped by the tool they come from. Each job shows when it last ran. Press **Run now** to run a job instead of waiting for its schedule, or **Stop** while it runs.
- **Recent tasks**, such as downloads or commands run with `ed`, with their progress and result. Press **Stop** to cancel one, or right-click it and choose **Copy task ID**.
- **Troubleshooting**, with an **Event timeline** you can search or narrow with **Failures only**, and **Copy command** under **Logs** to copy a Terminal command that shows the last hour of Edith's logs.

Closing the window or pressing `⌘W` never stops background work. To stop everything, choose **Quit Edith** (`⌥⌘Q`). If Edith is not set to open at login, background work only runs while Edith is open, and Diagnostics offers **Open login items**.

### From the terminal

```sh
ed agent status
ed agent jobs
ed agent jobs --json
```

`ed agent status` shows the state of the background services: build, process id, uptime, memory, CPU share and the path of their store.

`ed agent jobs` shows each job's id, its phase, its trigger, its cadence and how many pages are watching it. Some jobs run with no window open, and some speed up while a page that shows them is open. Phases are `idle`, `running`, `paused`, `off` and `failed`: `off` means the extension that owns the job is turned off, and `paused` means a power policy or the battery setting is holding it.

Run or cancel a job by its id:

```sh
ed agent run usage.refresh
ed agent cancel usage.refresh
```

`run` queues the job and returns at once. `cancel` asks a running job to stop. Check `ed agent jobs` or `ed agent events` for the result.

## Run a command as a durable task

`ed agent tasks exec` hands a command to Edith's task queue. Once accepted, the task keeps running even if you close the terminal that submitted it, and it shows up under **Recent tasks** in Diagnostics.

```terminal
$ ed agent tasks exec --detach --json -- /bin/sh -c 'sleep 2; printf "finished\n"'
$ ed agent tasks ls
$ ed agent tasks inspect <id>
$ ed agent tasks cancel <id>
```

- Put `--` before an absolute path to the program. Everything after it belongs to that program.
- Without `--detach`, `ed` waits and exits with the command's exit code. With `--detach`, it returns the task id at once.
- `--timeout` bounds the run in seconds. The default is 300.
- `inspect` returns the task's state, its saved output and its result. `cancel` stops the task's process group. Cancelling does not undo what the command already did.

A task that was running when Edith restarted stays visible as interrupted.

## Schedule a command

`ed agent schedule` runs a command on an interval or a cron rule, inside Edith, with no window and no terminal open. Schedules are saved, so they survive restarts, updates and reboots.

```sh
ed agent schedule add sync --every 15m -- /usr/bin/true
ed agent schedule add nightly --cron "30 2 * * *" --timeout 3600 -- /usr/bin/true
ed agent schedule ls
ed agent schedule run sync
ed agent schedule disable nightly
ed agent schedule enable nightly
ed agent schedule rm sync
```

- `--every` takes a number and a unit, `s`, `m`, `h` or `d`, from 1 minute to 7 days.
- `--cron` takes a five-field expression in the Mac's local time zone: minute, hour, day of month, month, weekday. It accepts `*`, numbers, ranges, lists and steps. Names such as `mon` are not supported.
- `--cwd` sets the working directory. It defaults to the directory where you ran `add`.
- `--timeout` bounds each run, up to 7200 seconds. The default is 300.

Each run is an ordinary task, so follow it with `ed agent tasks ls` and `ed agent tasks inspect <id>`.

What Edith guarantees:

- A run missed while Edith was not running, or while the Mac slept through it, is skipped. The next run is planned from when Edith starts.
- A run is skipped while the previous run of the same schedule is still going, so slow commands never pile up.
- Edith keeps at most 64 schedules.

> **Warning:** Schedules run as you, unattended, and the command line is stored without encryption. Keep secrets out of the arguments and let the command read them from the Keychain or a file.

## Read events and logs

In **Settings > About > Show diagnostics**, open **Event timeline** to see recent jobs and tasks: queued, started, cancel requested, finished. Events survive a restart. If the background helper gets stuck, press **Restart** at the top of Diagnostics. It restarts without restarting the app.

From the terminal:

```sh
ed agent events
ed agent logs --last 1h
ed agent restart
```

`ed agent logs` reads Edith's lines from the macOS unified log, so it works even when Edith is not running.

## Keep the output of a long command with `ed run`

`ed run` wraps a command you choose, saves its output and exit status, and notifies you when it finishes:

```sh
ed run --label "Build" -- make build
ed run --no-notify -- sh -c 'make test 2>&1 | tail -n 50'
```

The command runs in your current directory with your environment, and its output still appears in your terminal. `ed run` exits with the command's exit code. Use `sh -c '...'` for pipelines and redirects. Full-screen and interactive programs do not work under `ed run`, so run those directly.

Read saved results:

```sh
ed runs ls
ed runs show <id>
ed runs open <id>
ed runs remove <id>
ed runs diagnose
```

Clicking the notification opens that run's report. It never runs the command again. Edith keeps the newest 200 finished results for up to 30 days. Results are saved under `~/Library/Application Support/Edith/Data/terminal/run-inbox`. The output can contain secrets, so remove results you no longer need.

Notifications come from the Terminal extension in the running Edith. If Edith is closed or Terminal is off, the result is still saved without a notification. Allow notifications in **Settings > Permissions**, or with `ed permissions request notifications`.

## Related

- [`ed agent` reference](https://getedith.pro/docs/cli/agent), including [`schedule`](https://getedith.pro/docs/cli/agent/schedule) and [`tasks`](https://getedith.pro/docs/cli/agent/tasks).
- [`ed run` and `ed runs` reference](https://getedith.pro/docs/cli/run-inbox).
- [Troubleshooting](https://getedith.pro/docs/troubleshooting).

## Get Edith

Edith is a native Mac app for macOS 14 or later on Apple silicon with 100+ extensions, the `ed` command line and an MCP server. $35 once for one Mac, plus $7 for each additional Mac, with no subscription and a 30-day refund.

- [Buy Edith](https://getedith.pro/pricing): $35 once for one Mac, plus $7 for each additional Mac
- [Download Edith](https://getedith.pro/download): the installer, or Homebrew
