So I have a node.js script that parses RSS feeds and posts new articles to a subreddit. The problem is i'm inexperienced with node.js and I'm having trouble getting this script to run on an interval (every 5 mins).
My system is a Raspberry Pi 2 running Raspbian in headless mode.
This is the script I'm using.
Sop far I've tried to use cron to start a shell script that initiates the js script every 5 mins. It doesn't work. (Probably because I just learned what all these things are yesterday morning.)
here's the cron config:
*/5 * * * * /home/pi/rss_bot/runrss.sh
Here's the .sh:
!#/bin/bash
node /home/pi/rss_bot/rss_bot.js
I have changed perms of the runrss.sh using chmod +x runrss.sh hoping that would work, even set the cron using sudo crontab -e
Not finding a ton of info online and was hoping you guys could help me out. I doubt I'm even thinking along the right lines using cron. Bleh...
Thanks!