Added README for cron
This commit is contained in:
parent
6daab12668
commit
9b7482b9f6
47
.config/scripts/cron/README.md
Normal file
47
.config/scripts/cron/README.md
Normal file
@ -0,0 +1,47 @@
|
||||
# `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
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Label</key>
|
||||
<string>launchd.restic</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>/bin/zsh</string>
|
||||
<string>-c</string>
|
||||
<string>source /Users/noahheague/.zshrc ; /Users/noahheague/.config/scripts/cron/backup-server.sh</string>
|
||||
</array>
|
||||
<key>StandardErrorPath</key>
|
||||
<string>/Users/noahheague/restic-err.txt</string>
|
||||
<key>StandardOutPath</key>
|
||||
<string>/Users/noahheague/restic-out.txt</string>
|
||||
<key>StartCalendarInterval</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Hour</key>
|
||||
<integer>0</integer>
|
||||
<key>Minute</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>UserName</key>
|
||||
<string>noahheague</string>
|
||||
</dict>
|
||||
</plist>
|
||||
```
|
Loading…
Reference in New Issue
Block a user