Guides
Have a cron line and want a launchd agent? The cron to launchd converter writes the plist in your browser.
- Cron to launchd converter
A tool, not a guide: paste a crontab line and get a ready-to-load plist with StartCalendarInterval, the schedule in plain English, the next five runs, the launchctl bootstrap lines and the macOS gotchas for that line. Runs in your browser.
- How to add a cron job on a Mac
crontab -e, the five fields with two worked examples, the day-of-week trap, escaping %, giving cron a PATH, choosing where the output goes, and a two-minute test that proves the job fires.
- crontab is not running on macOS
Five checks in the order that finds it fastest: is the line installed, is cron running at all, is the command on cron's short PATH, does the job need Full Disk Access, and what did it print into the mailbox nobody reads.
- cron: Operation not permitted on macOS
A job that touches Desktop, Documents, Downloads or an external volume fails until /usr/sbin/cron has Full Disk Access. The six steps, why macOS does it, how to prove it worked, and the five reasons it still fails.
- launchd StartCalendarInterval examples
Working property lists for daily, weekday, weekly and several-times-a-day schedules, the wildcard rule that catches everybody, StartInterval, and the launchctl commands to load a job and read back its run count.
- cron vs launchd on macOS
Side by side on syntax, missed runs while the Mac slept, environment, where the output goes, and what history you can read back afterwards — plus which one to reach for.
- Run a script every day on a Mac
The one-line crontab entry, the launchd agent that also runs after the Mac wakes, a table of common schedules, and the four things that stop either of them working.
- Where does cron output go on a Mac?
Into /var/mail/<user>, a plain text file nothing on macOS opens. How to read it, what MAILTO does and does not do, how to redirect to a log instead, and why the unified log has nothing.
- “You have mail” in Terminal on a Mac
The line comes from login, and it means /var/mail/<user> is not empty, almost always because a cron job printed something. See which job, read and empty the mailbox, stop it refilling with a redirect or MAILTO="", and the zsh version between prompts.
- crontab -e opens vim on macOS
How to get out of vi, how to make VISUAL and EDITOR point at nano or VS Code, the --wait flag graphical editors need, and how to keep your crontab in a file you can put in a repository.
- cron date +%Y not working: the percent sign in crontab
cron ends the command at the first unescaped % and feeds the rest to it as standard input. Why quotes do not help, the \% escape, the script that avoids the problem, where the syntax error ends up, and the feature used on purpose.
- Does cron run when a Mac is asleep?
No, and it does not catch up on wake. What the launchd man page promises for StartCalendarInterval, waking the Mac with pmset repeat before the job, holding it awake with caffeinate, and why Power Nap does not help.
- cron: command not found on a Mac
A cron job gets PATH=/usr/bin:/bin and none of your profile. The full-path and PATH-line fixes, why PATH=$PATH:… does not work, Apple's own python3 answering instead of Homebrew's, version managers, and zsh -lc.
- Crontab syntax explained, with examples
The five fields and four operators, a table of common schedules from every 5 minutes to quarterly, why */7 is not every seven minutes, the day-of-month or day-of-week trap, and workarounds for the first Monday and the last day of the month.
- Run a Python script from cron on a Mac, with a virtualenv
Run .venv/bin/python by its full path instead of activating, cd into the project, log tracebacks with 2>&1 and -u, test in cron's environment, uv and Poetry, and the Full Disk Access and Homebrew-upgrade traps.
- Recover a crontab deleted with crontab -r on a Mac
crontab -r does not ask. Where macOS keeps the file, getting it back from Time Machine, cron's mail and shell history, reinstalling it, and a backup that survives the next accident.
- git push from cron: Permission denied (publickey) on a Mac
A cron job gets no SSH_AUTH_SOCK, so the ssh-agent that unlocks your key in Terminal is not there. How to reproduce it with cron's environment, a deploy key with IdentitiesOnly, running it as a launchd agent instead, and what not to do.
- Cron job works in the terminal but not from cron on a Mac
What Terminal gives a command for free and cron does not: PATH, your profile, zsh, the working directory, a terminal to answer prompts, the SSH agent and Full Disk Access, in the order they bite. An env -i line that runs the job the way cron will, and a script that works in both places.
- launchctl: Load failed: 5: Input/output error
launchd says 5 for everything. Five checks in order: already loaded, a property list that does not parse or lacks a Label, the disabled list, the wrong domain with sudo or ssh, and file ownership. Then the bootstrap and bootout commands to use instead of load.
Something missing? Email [email protected] with the question you were searching for.