Platform Support
native-scheduler supports four backends. The auto backend (default) selects the appropriate one based on the current OS.
launchd (macOS)
The primary backend. Jobs are registered as user-level LaunchAgents (~/Library/LaunchAgents/).
Features supported:
startIntervalSeconds→StartIntervalcalendar→StartCalendarInterval(array of entries)runAtLoad→RunAtLoadstdoutPath/stderrPath→StandardOutPath/StandardErrorPathenable/disablevialaunchctl bootout/launchctl bootstrap
Notes:
- Jobs use the
com.<namespace>.<jobId>naming convention for plist labels - The wrapper runner is materialized as a standalone script alongside the plist
systemd (Linux)
Jobs are registered as user-level systemd service + timer units.
Features supported:
startIntervalSeconds→OnUnitActiveSectimerworkingDirectory→WorkingDirectoryenvironment→Environmentdirectivesenable/disableviasystemctl --user enable/disable
Notes:
- Requires
loginctl enable-lingerfor the user to allow timers to run without an active session calendarentries are not directly mapped — usestartIntervalSecondsfor simple intervalsrunAtLoadis not supported; useOnBootSec=0in the timer if needed
cron
Fallback backend using the user's crontab.
Features supported:
startIntervalSeconds→ best-effort cron expression (rounds to nearest minute)environment→ crontabKEY=VALUElinesenable/disableby commenting/uncommenting the crontab entry
Limitations:
- Minimum interval is 60 seconds (cron granularity)
calendar,runAtLoad,stdoutPath,stderrPath,workingDirectoryare not supported- Job identification uses comment markers in the crontab
Windows Task Scheduler
Jobs are registered via schtasks.exe.
Features supported:
startIntervalSeconds→/SCschedule with/RIrepetition intervalenvironment→ set via wrapper scriptenable/disablevia/ENABLE//DISABLEflags
Limitations:
calendar,runAtLoad,stdoutPath,stderrPathare not directly mapped- Minimum interval granularity is 1 minute
Backend auto-detection
| Platform | Backend |
|---|---|
macOS (darwin) | launchd |
| Linux | systemd (falls back to cron if systemd is unavailable) |
| Windows | windows-task-scheduler |