-
Notifications
You must be signed in to change notification settings - Fork 132
User crontab example
Example user crontab for cloudbox users.
Note that this is just one example, not a list of things that any particular user should have in their crontab.
crontab -e
@daily /opt/python-plexlibrary/plexlibrary.sh
0 7 * * 7 sudo PATH='/usr/bin:/bin:/usr/local/bin' env ANSIBLE_CONFIG='/home/seed/cloudbox/ansible.cfg' '/usr/local/bin/ansible-playbook' '/home/seed/cloudbox/backup.yml' -v >> '/home/seed/logs/cloudbox_backup.log' 2>&1
@daily curl -s https://cloudbox.works/scripts/repo.sh | bash >/dev/null && cd ~/cloudbox
* * * * * /opt/scripts/nzbget/cleanup.sh
0 10 * * * /opt/scripts/plex/optimize.sh
0 * * * * PATH='/usr/bin:/bin:/usr/local/bin' cd /opt/SonarrSync/ ; /usr/bin/python SonarrSync.py
Line 1: python-plexlibrary
script to make Plex libraries. Installed automatically with run of Cloudbox role. - [Runs midnight daily server time]
Line 2: Cloudbox backup. - [Runs every Sunday @ 7AM server time]
Line 3: Cloudbox repo.sh script to update Cloudbox and do auto-updates for you - [Runs daily]
Line 4: rxwatcher's cleanup script to remove left over junk in /downloads/nzbs/nzbget/completed/sonarr/* etc. - [Runs every minute] Note: Scroll down for script.
Line 5: Script to optimize the Plex database. - [Runs daily @ 10AM server time]
Note: Scroll down for script.
Line 6: Enormoz's SonarrSync (based on Sperryfreak's RadarrSync) - [Runs hourly]
more nzbget_cleanup.sh
#!/bin/bash
find /mnt/local/downloads/nzbget/completed/sonarr/* -type d -mmin +60 -ls -exec rm -rf {} + 2>/dev/null
find /mnt/local/downloads/nzbget/completed/radarr/* -type d -mmin +60 -ls -exec rm -rf {} + 2>/dev/null
find /mnt/local/downloads/nzbget/completed/books/* -type d -mmin +240 -ls -exec rm -rf {} + 2>/dev/null
find /mnt/local/downloads/nzbget/completed/sonarr/* -type d -mmin +60 -ls -exec rm -rf {} + 2>/dev/null
find /mnt/local/downloads/nzbget/completed/radarr4k/* -type d -mmin +60 -ls -exec rm -rf {} + 2>/dev/null
find /mnt/local/downloads/nzbget/completed/anime/* -type d -mmin +60 -ls -exec rm -rf {} + 2>/dev/null
#!/bin/sh
# Get the contents of the Preferences file, keep only what we need, push to a temp, then use it in the curl command
cat "/opt/plex/Library/Application Support/Plex Media Server/Preferences.xml" | \
sed -e 's;^.* PlexOnlineToken=";;' | sed -e 's;".*$;;' | tail -1 > /tmp/plex.tmp
curl --request PUT http://127.0.0.1:32400/library/optimize\?async=1\&X-Plex-Token=`cat /tmp/plex.tmp`
rm -f /tmp/plex.tmp
- airdcpp
- Airsonic
- alltube
- always
- amongus
- Apprise
- archivebox
- arrX (SonarrX, RadarrX, BazarrX)
- AssHama
- autoscan
- Bazarrx
- Beets
- Bitwarden
- Booksonic
- Bookstack
- btrfsmaintenance
- calibre-web
- calibre
- Coder
- comicstreamer
- comixed
- couchpotato
- Dashmachine
- deemix
- deezloader-remix
- Deluge
- DelugeVPN
- Drive STRM
- eBooks: Calibre and Calibre web
- emby2
- embystat
- EPMS
- Filebot
- Filebrowser
- filezilla
- FlareSolverr
- Funkwhale
- Gazee
- Gitea
- Glances
- Goplaxt
- gotify
- grafana
- Guacamole
- Handbrake
- Heimdall
- Hetzner NFS VLAN
- influxdb
- InvoiceNinja
- JDownloader2
- Jellyfin
- Jirafeau
- KCPTUN
- Kitana
- komga
- Krusader
- LazyLibrarian
- lidarrx
- Logarr
- Mango
- Mediabutler
- medusa
- Mellow
- Minecraft
- Monitorr
- Mylar
- mylar3
- navidrome
- Nextcloud
- NowShowing
- NZBHydra (v1)
- ombix
- Organizr (v1)
- ouroboros
- overseerr
- paperless-ng
- plex2
- Pyload
- qBittorrent
- qbittorrentvpn
- Quassel
- RadarrX
- redbot
- requestrr
- requestrrx
- resilio-sync
- rocketchat
- sickchill
- searx
- SonarrX
- Speedtest
- SSHswifty
- stash
- Subsonic
- SyncLounge
- Tdarr
- telegraf
- Telly
- TheLounge
- transmissionvpn
- transmissionx
- ubooquity
- Unifi
- unmanic
- Varken
- vnstat
- wallabag
- Watchtower
- Wordpress
- Xteve
- ZNC
- Custom python plexlibrary libraries
- Speed up Plex / Emby / Jellyfin
- Tautulli Custom Scripts
- Plex Scanners and Agents