wizardshit.ai
Tutorial·2026-03-13·11 lessons·Joel Hooks·James Long

Scheduled Local AI Jobs on macOS with launchd

Build a local-first AI job scheduler on macOS using launchd, from sync and plists to AI jobs, WatchPaths, and dashboards.

Scheduling local AI jobs on your own machine turns a clever prompt into a durable system. This tutorial walks straight through the working pattern: jobs as directories, launchd as the scheduler, and tiny scripts you can actually evolve.

You will build the manager, ship a real AI job, wire up reactive WatchPaths workflows, and then choose the dashboard surface that fits how you work.

Lesson outline

  1. Your First Job — Init the project, create your first job, see it register with launchd.
  2. Anatomy of a Job — What's inside a job directory — the schedule file and the run script.
  3. Parse a Schedule File — Read a schedule file, handle all three types, write tests.
  4. Generate a Plist — Turn a JobDefinition into valid plist XML that launchd can consume.
  5. Register with launchd — installJob: write the plist, bootout the old, bootstrap the new, enable it.
  6. Declarative Sync — syncAllJobs: discover desired state, diff against installed, converge.
  7. Your First AI Job — A job that calls an LLM to do real work. Choose your provider.
  8. WatchPaths: Reactive AI — A job triggered by filesystem changes. Drop a file, AI processes it.
  9. Logs, Errors, and Debugging — Where logs go, what to do when jobs fail, how to diagnose.
  10. Hardening — Idempotent sync, error recovery, safe-to-repeat patterns.
  11. Dashboard — See your jobs at a glance. Choose how you want to see them.
  1. 01Your First Job
  2. 02Anatomy of a Job
  3. 03Parse a Schedule File
  4. 04Generate a Plist
  5. 05Register with launchd
  6. 06Declarative Sync
  7. 07Your First AI Job4 branches
  8. 08WatchPaths: Reactive AI3 branches
  9. 09Logs, Errors, and Debugging
  10. 10Hardening
  11. 11Dashboard5 branches