Skip to content

Handling failures

A run fails when its command exits non-zero, runs past its timeout, or was still running when the daemon died. The full list, and how to change it per task, is in failures.

A failed run is red in the Web UI and the TUI. Its header shows why it ended and the exit code; below is everything the command printed. See Failed runs in the Web UI and Reading a failure in the TUI. From the shell:

Terminal window
runwisp logs backup-db

Without a timeout, a stuck command runs forever. Give the task a limit:

runwisp.toml
[tasks.backup-db]
# ...
timeout = "30m"

For a job that sometimes fails for a passing reason (a flaky network, a busy API), let RunWisp retry it:

runwisp.toml
[tasks.publish-feed]
# ...
retry_attempts = 3
retry_delay = "1m"

Each attempt is its own run, with its own log. See Failures, retries & timeouts.

Every failure already shows up in the bell in the Web UI and the TUI, with no setup. To get it in Slack, email, or another channel, add a notifier and point the task at it:

runwisp.toml
[notifiers.slack-ops]
type = "slack"
webhook_url = "${SLACK_OPS_URL}"
[tasks.backup-db]
# ...
notify = ["slack-ops"]

Notifications covers every channel, alerting for all tasks at once, keeping the webhook URL out of the file, and testing a channel.