-
-
Notifications
You must be signed in to change notification settings - Fork 15
UserScripts
First, we need to install Python directly on Unraid using the NerdTools plugin.
If you haven't installed NerdTools yet, you can do so by going to the Unraid forums. Follow the instructions provided there to install the NerdTools plugin. Once you have installed NerdTools, you can use it to install Python.
Next, we'll manually install the required Python dependencies using pip. The dependencies required for this setup are listed in the requirements.txt file.
To install these, run the following commands:
pip install -r /path/to/your/requirements.txtIf you prefer to run your script at regular intervals using cron, you can do so by editing the crontab.
crontab -e
This will open the crontab file in an editor. Here, you can add a line at the end to schedule your script. To help with the syntax for cron jobs use CrontabGuru For example, to run your script every day at 5 PM, you would add:
0 17 * * * python3 /path/to/your/plexcache.py
Remember to replace /path/to/your/plexcache.py with the actual path to your plexcache script.
Alternatively, you can use the User Scripts plugin to run your script. If you haven't installed the User Scripts plugin yet, you can do so by following the instructions on the Unraid forums.
Once you have installed the User Scripts plugin, you can create a new script and paste this into it:
#!/bin/bash
python3 /path/to/your/plexcache.py
To schedule your script, go to the script settings and set the schedule according to your preferences. You can choose from options such as "At startup", "Hourly", "Daily", "Weekly", etc.
Remember to save your changes before closing the User Scripts plugin.
Please ensure to replace the placeholder paths and commands with those that suit your specific setup.