Scheduling
Workers can run manually, on a schedule, or continuously via the background daemon.Manual Runs
Run any worker on demand from the REPL:Schedule Types
Workers support four schedule types, configured in the charter’sschedule field:
Interval
Run at a fixed frequency:Nm (minutes), Nh (hours), Nd (days). Examples:
"15m"— every 15 minutes"1h"— every hour"2h"— every 2 hours"1d"— daily at midnight
"15m"becomes*/15 * * * *"1h"becomes0 */1 * * *"1d"becomes0 0 * * *
Cron
Standard cron expressions for precise scheduling:"0 9 * * *"— daily at 9 AM"0 9 * * 1"— every Monday at 9 AM"0 10 * * 1-5"— weekdays at 10 AM"0 8 * * *"— daily at 8 AM
Continuous
Runs 24/7, restarting after each execution:Trigger (On-Demand)
Only runs when manually triggered or invoked via API:Schedule Inference
When you describe a worker, the schedule is inferred from your language:| Your description | Inferred schedule |
|---|---|
| ”continuously”, “always”, “24/7” | continuous |
| ”every 2 hours” | interval: 2h |
| ”every 30 minutes” | interval: 30m |
| ”hourly” | interval: 1h |
| ”daily”, “every day” | cron: 0 9 * * * (9 AM daily) |
| “weekly” | cron: 0 9 * * 1 (Monday 9 AM) |
| “every morning” | cron: 0 8 * * * |
| ”monitor”, “watch”, “check” | interval: 1h |
| ”when”, “if”, “trigger” | trigger: on_demand |
Managing Schedules
View all active schedules:The Daemon
The daemon is a persistent background process that runs all scheduled workers. It survives terminal close and can be configured to start on boot.Starting the Daemon
| Platform | Method | Details |
|---|---|---|
| macOS | launchd | Uses ~/Library/LaunchAgents/com.nooterra.daemon.plist |
| Linux | systemd | Uses ~/.config/systemd/user/nooterra.service |
| Fallback | spawn | Detached child process |
Daemon Commands
Daemon Status
Install as System Service
To start the daemon automatically when you log in:RunAtLoad and KeepAlive enabled. On Linux, this creates and enables a systemd user service with Restart=on-failure.
To remove:
Health and Reliability
The daemon includes several reliability features: Heartbeat: Every 30 seconds, the daemon writes its status to~/.nooterra/daemon-status.json. This is used to detect stale daemons.
Stale detection: If the heartbeat file is older than 2 minutes, the daemon is considered dead even if the PID is still alive (handles PID recycling).
Auto-restart: On crash, the daemon waits 5 seconds and restarts. Maximum 5 restarts within a 10-minute window before giving up.
Log rotation: The daemon log at ~/.nooterra/logs/daemon.log is rotated when it exceeds 5 MB. Three rotated copies are kept.
Graceful shutdown: On SIGTERM or SIGINT, the daemon flushes state, cleans up the PID file, and exits cleanly.
Worker Discovery
The daemon polls for new workers every 60 seconds. When you create a new worker with a schedule, the daemon automatically picks it up and registers its schedule. Workers with statuspaused or archived are skipped during scheduled execution.
Execution During Scheduled Runs
When the scheduler fires a worker:- The worker definition is loaded from disk
- API credentials for the worker’s provider are resolved
- The worker executes via the standard execution engine
- Results are recorded as a run receipt
- Notifications are sent (success or failure)