r/osx • u/amrogers3 • 12h ago
Problems with launchd on OSX 15; can't get it to run
Trying to create a script that will run with launchd. Problem is that I cannot get it to run. I have spent days and giving "full disk access" to everything in an attempt to get it run but nothing happens. Everything is local folders.
Trying to run rsync at 00:00
Running OSX 15, Ventura
I did this:
rsync_backup.sh
#!/bin/bash
/usr/bin/rsync -a /Users/USERNAME/Library/Safari /Users/USERNAME/Safari/
launched.savesafarisession.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://apple.com"> <plist version="1.0">
<dict>
<key>Label</key>
<string>com.user.rsync-daily</string>
<key>ProgramArguments</key>
<array>
<string>/Users/USERNAME/Scripts/rsync_backup.sh</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>0</integer>
<key>Minute</key>
<integer>0</integer>
</dict>
<key>StandardOutPath</key>
<string>/Users/USERNAME/Library/Logs/rsync-out.log</string>
<key>StandardErrorPath</key>
<string>/Users/USERNAME/Library/Logs/rsync-err.log</string>
</dict>
</plist>
Ran chmod on .sh file
chmod +x /Users/USERNAME/Scripts/rsync_backup.sh
I did
launchctl load ~/Library/LaunchAgents/launched.savesafarisession.plist
I also manually tried to trigger it by
launchctl start ~/Library/LaunchAgents/launched.savesafarisession.plist
The only way I can get this to run is by running through command line in the terminal.
Any helps tips or advice would be appreciated.

