Plain cron runs your scripts and forgets about them. When a backup hangs, a token expires, or a script prints an error and exits 0, you find out weeks later. localjobs is a small scheduler for the automations you run on your own Mac or Linux box. It runs them on schedule and keeps track of how each one went.
You list jobs in one JSON file (name, cron schedule, command, args, timeout). localjobs runs them, keeps a log file per job, and records the last run, status, exit code, and last lines of output for each. A local status API and an optional Discord alert tell you when something breaks, and again when it recovers.
Features
- Cron schedules: standard 5-field expressions,
@daily-style shortcuts,@every 10m, and several schedules per job - Timeouts that actually kill: each job runs in its own process group, so a timeout stops the command and everything it started
- Per-job log files with a start and end line for every run (status and duration)
- Catches "successful" failures:
fail_on_output_regexfails a run when output likeTracebackorERROR:appears, even with exit code 0 - Late and missed runs: runs that fire late after sleep are logged,
skip_if_late_minutesskips stale catch-up runs, and jobs that missed their last scheduled time are flaggedoverdue - No pile-ups: a run that's still going blocks the next one, which is skipped and counted
- Status API on localhost:
/api/health(with an optional 503 mode for uptime monitors) and with last run, status, error, and counts. Read-only, so nothing can trigger jobs over HTTP.