# `launchd` & `cron` Currently all these scheduled jobs run on an up-to-date MacOS system. This means that `launchd` is the preffered method of scheduling jobs. Sadly, `launchd` plist files exist at `~/Library/LaunchAgents/` which means if I sync these to this repository, they will polute standard linux home folders. (By default MacOS hides `~/Library`) Eventually - I do plan on migrating my primary server to a linux-based system. But that costs money and the Mac it's currently running on was free. ## Backup launchd configuaration ```sh launchctl remove launchd.restic # If it's already running launchctl load -w ~/Library/LaunchAgents/launchd.restic.plist launchctl list | grep restic ``` ```plist Label launchd.restic ProgramArguments /bin/zsh -c source /Users/noahheague/.zshrc ; /Users/noahheague/.config/scripts/cron/backup-server.sh StandardErrorPath /Users/noahheague/launchd/restic-err.txt StandardOutPath /Users/noahheague/launchd/restic-out.txt StartCalendarInterval Hour 0 Minute 0 UserName noahheague ``` ## DNS launchd configuaration ```sh launchctl remove launchd.dns # If it's already running launchctl load -w ~/Library/LaunchAgents/launchd.dns.plist launchctl list | grep dns ``` ```plist Label launchd.dns ProgramArguments /bin/zsh -c source /Users/noahheague/.zshrc ; /Users/noahheague/.config/scripts/cron/dns.sh StandardErrorPath /Users/noahheague/launchd/dns-err.txt StandardOutPath /Users/noahheague/launchd/dns-out.txt StartInterval 900 UserName noahheague ```