License not working when script called by crontab
Posted: 29 Aug 2019, 12:17
I have a python script that downloads some files from the internet.
In that script, if the condition are met the filebot command line is executed through a system call and renames the files.
This script works with no issue when I call it through the terminal. But for some reason when called through the (Cron job) Filebot fails to find my license.
The Filebot script that is called (I'm sure the script is good, because it works when the license is found)
This is what the logfile outputs looks like when called through the terminal:
https://i.imgur.com/J7VLAR5.png
Called through the crontab command (license fails):
https://i.imgur.com/5ulsqaY.png
Any advice welcomed. Ty.
Code: Select all
/media/full/path/myscript.py
This script works with no issue when I call it through the terminal. But for some reason when called through the
Code: Select all
crontab
The Filebot script that is called (I'm sure the script is good, because it works when the license is found)
Code: Select all
FILEBOTSCRIPT="filebot -script fn:amc --log INFO --output \"" + outDir + "\" --action move --conflict auto -non-strict \"" + inDir + "\" --filter \"(n != \'American Dad!\' || s == 16)\" --log-file amc.log --def clean=y music=y subtitles=en musicFormat=\"{plex}\" movieFormat=\"{plex}\" seriesFormat=\"{plex}\" minFileSize=4"
print('Called Filebot command')
return os.system(FILEBOTSCRIPT)
https://i.imgur.com/J7VLAR5.png
Called through the crontab command (license fails):
https://i.imgur.com/5ulsqaY.png
Any advice welcomed. Ty.