Hi all.
New user of the script here encountering a puzzling problem.
I’ve got the config file customized and it works exactly as configured when I run it manually. As in I have everything in a C:\Python folder, I CD to it and manually run Python.exe PlexCleaner.py and everything works and the appropriate files are deleted (relevant portions of log below)…
INFO:root:American Gothic - S01xE003 - Nighthawks | Viewed: 1 | Days Since Last Viewed: 0 | On Deck: False
INFO:root:Finding files similar to: Z:\TV\American Gothic\Season 01\American Gothic - s01e03 - Nighthawks*
INFO:root:**[DELETED] Z:\TV\American Gothic\Season 01\American Gothic - s01e03 - Nighthawks.mp4
INFO:root:----------------------------------------------------------------------------
INFO:root:----------------------------------------------------------------------------
INFO:root: Summary – Script Completed Successfully
INFO:root:----------------------------------------------------------------------------
INFO:root:
INFO:root: Total File Count 86
INFO:root: Kept Show Files 85
INFO:root: On Deck Files 0
INFO:root: Deleted Files 1
INFO:root: Moved Files 0
INFO:root: Copied Files 0
INFO:root: Flagged Files 0
INFO:root: Rescanned Sections 2
INFO:root:
INFO:root:----------------------------------------------------------------------------
INFO:root:----------------------------------------------------------------------------
In order to schedule the deletion of watched shows I created a batch file that basically replicates what I’m doing manually…
cd \Python
Python.exe PlexCleaner.py
I then have a scheduled task (which runs with the exact same account credentials as the account I’m logged in as when I run the command manually) that simply runs the batch file every morning. When the scheduled task runs (it actually ran earlier this morning before I ran the commands manually as shown above) it logs this…
INFO:root:American Gothic - S01xE003 - Nighthawks | Viewed: 1 | Days Since Last Viewed: 0 | On Deck: False
INFO:root:[NOT FOUND] Z:\TV\American Gothic\Season 01\American Gothic - s01e03 - Nighthawks.mp4
INFO:root:----------------------------------------------------------------------------
INFO:root:----------------------------------------------------------------------------
INFO:root: Summary – Script Completed Successfully
INFO:root:----------------------------------------------------------------------------
INFO:root:
INFO:root: Total File Count 86
INFO:root: Kept Show Files 85
INFO:root: On Deck Files 0
INFO:root: Deleted Files 0
INFO:root: Moved Files 0
INFO:root: Copied Files 0
INFO:root: Flagged Files 0
INFO:root: Rescanned Sections
INFO:root:
INFO:root:----------------------------------------------------------------------------
INFO:root:----------------------------------------------------------------------------
I’m running Windows 10. It’s almost like the scheduled task is running into a rights issue but the task is configured to use the exact same credentials and with highest privileges. So, everything is working great except I can’t get it to work via scheduled task.
Any ideas?