youtube-subscription-dl
youtube-subscription-dl copied to clipboard
cron Issue
I'm having some issues with this script launched from cron on macOS. I have followed all the installation steps and have a working configuration - working at least from zsh. However, I'm struggling with cron, even though I know it is working on the author's machine that way.
First, I've read the "canonical cron issues" file on serverfault and checked that my issue isn't one of those. I think I can rule all of them out.
I created a user crontab as follows:
PATH=/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin 0 * * * * /Users/myuser/scripts/youtube-subs/yt-subs.sh >>/tmp/yt-subs.log
Watching the log file in tmp, I see:
2021.06.06 [youtube] EuBKewWTag0: Downloading webpage [youtube] xbsVwPySHoo: Downloading webpage ... various more of the same ... Finished downloading youtube subscriptions No new videos
I can see that the history.json file is being updated from cron, and indeed if I delete it, it is re-created. I don't see archive.txt generated at all in either case.
I'm pretty certain this is a configuration issue with how I'm using crontab but I haven't yet figured out what environment variable I'm missing or if I'm somehow launching the script incorrectly. My PATH is taken from my .zprofile. I've reviewed the (nicely-commented) source code but nothing jumps out at me.
I'd appreciate some pointers if anyone who has this working would be so kind. Thanks.
@matthocker Hopefully this can help as it walks through the full process of setting it up for plex :) https://mightywomble.medium.com/using-plex-to-deliver-your-youtube-subscription-videos-db219ad95dd6