I use the following in CronTab to run this python script:
Code: Select all
*/15 * * * * /boot/scripts/rss_tv.sh 2>&1 > /dev/null
- I don't need output errors of the shell script, so they get put to /dev/null
rss_tv.sh contains the following:
Code: Select all
python /boot/scripts/rss_tv.py >> /mnt/staging/SABnzbd/logs/rss_tv_nb.log
Which will allow me to log what went on during the script (at least in this time of change for it), plus I can make changes to the shell script and not have to make changes to CronTab (which can be a PITA),
You can run the script directly from cron with the following:
Code: Select all
*/15 * * * * python /boot/scripts/rss_tv.py 2>&1 > /dev/null
- will put all errors and output to /dev/null
The above examples run the script every 15 minutes, which is what I previously had my RSS feeds in SAB to scan at.
You can edit CronTab directly with
list its contents with
You can also import an update Crontab file...
First output the current crontab to a file then add the lines and then import it... For example:
Code: Select all
crontab -u root -l /tmp/crontab.root
- Dumps crontab for the user "root"
Edit crontab as you need to, then run the following to import the changes:
Hope this helps.
markus