﻿After you edit `runwisp.toml`, tell the running daemon to pick it up:

```bash
runwisp reload
```

```
Configuration reloaded.
  + added   nightly-backup
  ~ changed report (schedule)
  - removed old-cleanup
  ~ setting notifications
```

The daemon never watches the file. It reloads only when you ask, and every way
of asking runs the same reload:

- `runwisp reload` from the CLI.
- `SIGHUP` to the daemon: `kill -HUP "$(cat .runwisp/daemon.pid)"` (the PID file
  is in the data directory).
- <kbd>R</kbd> in the [TUI](/getting-started/tui-tour/).
- The **Reload** button on the Web UI banner that appears when the file changed
  since the daemon loaded it.

`runwisp status` and the TUI header show the same "config changed" notice.

A RunWisp that an app started with the [PHP](/sdk/php/#deploy) or
[JavaScript](/sdk/javascript/) SDK has no `runwisp.toml`. Its reload asks the
app for its config as the app's code defines it now, and a reload the app
can't answer is rejected like a bad file.

A daemon started with `runwisp station` reloads the same way. The Station
schedules the tasks there, so no local cron entries change; after the reload the
daemon sends the new task list to the Station.

## A bad config changes nothing

The daemon loads and validates the whole new config before it touches anything.
If the file doesn't parse, fails validation, or changes a setting that needs a
restart, the reload is rejected and the running tasks stay exactly as they were.

```console
$ runwisp reload
Error: reload rejected: [daemon] tls changed; requires `runwisp restart`
```

Fix the file and reload again. To check a file without involving the daemon,
run [`runwisp validate`](/reference/cli/#runwisp-validate).

## What a reload applies

- Adding, removing, and changing tasks and services: commands, schedules,
  environment, instances, overlap, and retry settings.
- [`[defaults]`](/configuration/defaults/): shows up as a change on every task
  that inherits the changed key.
- [`include`](/configuration/daemon/#include) and
  [`include_cron`](/configuration/daemon/#include_cron), and the files they pull
  in.
- [`[notify]`](/configuration/notify/), `[notifiers.*]`, and
  [`[[route]]`](/configuration/routes/), and the files `template_path` points
  to. Notifications sent after the reload use the new settings. Deliveries
  already being retried finish under the old ones.
- [`[storage]`](/configuration/storage/).
- [`timezone`](/configuration/daemon/#timezone). Every cron schedule and health
  check that doesn't set its own timezone moves to the new zone from now on.
  Ticks the move skips over are not caught up. With `timezone` unset, the
  daemon keeps the host zone it started with; a host zone change needs a
  restart.
- Every other [`[daemon]`](/configuration/daemon/) key, except the ones below.

`runwisp reload` lists the changed settings on `~ setting` lines.

## What needs a restart

A reload that changes any of these is rejected:

- [`tls`, `tls_cert`, and `tls_key`](/configuration/daemon/#tls-tls_cert-tls_key).
- [`metrics_enabled`](/configuration/daemon/#metrics_enabled) and
  [`metrics_listen`](/configuration/daemon/#metrics_listen).
- [`allow_station_dispatch`](/configuration/daemon/#allow_station_dispatch).

The bind address and port are [command-line flags](/reference/cli/#global-options),
and `RUNWISP_*` environment variables are read at startup. Both change only on a
restart.

```bash
runwisp restart
```

Running tasks get [`shutdown_timeout`](/configuration/daemon/#shutdown_timeout)
to finish before the daemon stops. See
[`runwisp restart`](/reference/cli/#runwisp-restart).

## Reload is not a restart

- **Added tasks start from now.** A task added by a reload doesn't run its
  [`run_on_start`](/configuration/tasks/#run_on_start) command and doesn't
  [catch up](/configuration/tasks/#catch_up) on earlier ticks.
- **Running runs finish under the old definition.** Changing or removing a task
  never kills a run that's already going. The next run uses the new definition.
- **A running service restarts only when the change reaches its process.** A
  new [`run`](/configuration/tasks/#run), `shell`, `working_dir`, `user`,
  `umask`, `env`, `secrets`, `env_base`, `timeout`, `graceful_stop`,
  `stop_signal`, `log_max_size`, `log_on_full`, `failures`, `health_check` or
  [`instances`](/configuration/services/#instances) restarts it, and so does a
  [`[defaults]`](/configuration/defaults/) change to any of them. Everything
  else applies without a restart: `description`, `keep_runs`, notifications,
  `restart` and its delay, and the rest. A restart policy change governs the
  instance's next exit.
- **Removed services are stopped.**
- **Removed tasks lose their pending retries.**
- **A stopped service stays stopped,** even if the new definition says
  [`autostart = true`](/configuration/services/#autostart). The reload prints a `!` warning about it. Start it with
  `runwisp start <service>`.
- **A known cron task keeps firing,** even if the new definition says
  [`autostart = false`](/configuration/tasks/#autostart). The reload prints a
  `!` warning about it. Pause it with `runwisp pause <task>`.

If you want `run_on_start` and catch-up to happen, use `runwisp restart`.
A `run_on_start = "boot"` task that already ran this boot stays skipped.

## Warnings after a reload

After the diff, `runwisp reload` prints warnings for the new config on `!`
lines. The most common is a crontab job that
[`include_cron`](/configuration/daemon/#include_cron) couldn't schedule, with
its file and line. That job isn't a task, so it never shows in the diff: a
reload after a bad `crontab -e` can say "no task changes" and still warn. The
same warnings show in `runwisp status`, the Web UI and TUI header, and
`runwisp validate`.

A reload also checks again whether the system cron daemon is still running. Jobs
RunWisp was holding back for cron become RunWisp's right away. The daemon does
this check on its own about once a minute too, so the reload only makes it
immediate.

Moving a task into `runwisp.toml` with `runwisp promote` usually reloads as "no
task changes". See [Staging and promoting](/coming-from/cron/#staging-and-promoting).
