Created
May 6, 2023 16:14
-
-
Save patent-ed/53715a971e554775d97f081a59e4dbc7 to your computer and use it in GitHub Desktop.
plist file for launchd - To set up the existing script (remove_old_plex_files.sh) to run once every day and empty the trash, you can use launchd. Here are the steps to create a launchd plist file and configure it to run the script daily:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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>com.user.remove_old_plex_files</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/local/bin/remove_old_plex_files.sh</string> | |
</array> | |
<key>StartCalendarInterval</key> | |
<dict> | |
<key>Hour</key> | |
<integer>1</integer> | |
<key>Minute</key> | |
<integer>0</integer> | |
</dict> | |
<key>StandardErrorPath</key> | |
<string>/tmp/com.user.remove_old_plex_files.err</string> | |
<key>StandardOutPath</key> | |
<string>/tmp/com.user.remove_old_plex_files.out</string> | |
</dict> | |
</plist> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment