View Single Post
Old 7-Nov-2019, 6:56 AM   #2
GroundUrMast
Moderator
 
GroundUrMast's Avatar
 
Join Date: Oct 2010
Location: Greater Seattle Area
Posts: 4,766
Using crontab for recurring recordings

I also use crontab to schedule recurring recordings. The following example represents my daily newscast recording schedule. I can watch a news cast until it is overwritten by the next scheduled recording of that newscast.

crontab -e is used to edit the cron-table.
crontab -l is used to list the current cron-table.

Code:
$ crontab -l
# Edit this file to introduce tasks to be run by cron.
# 
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
# 
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').# 
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
# 
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
# 
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
# 
# For more information see the manual pages of crontab(5) and cron(8)
# 
# m h  dom mon dow   command
59 10 * * 1-5 . $HOME/.profile; /bin/bash /home/tom/bin/recordTV.sh 4.1 KOMO-TV4.1NewsAt11AM 32 > /home/tom/tempcron4.1.log 2>&1
59 15 * * 1-5 . $HOME/.profile; /bin/bash /home/tom/bin/recordTV.sh 4.1 KOMO-TV4.1NewsAt4PM 32 > /home/tom/tempcron4.1.log 2>&1
59 22 * * * . $HOME/.profile; /bin/bash /home/tom/bin/recordTV.sh 4.1 KOMO-TV4.1NewsAt11PM 32 > /home/tom/tempcron4.1.log 2>&1
59 11 * * 1-5 . $HOME/.profile; /bin/bash /home/tom/bin/recordTV.sh 5.1 KING-TV5.1NewsAtNoon 32 > /home/tom/tempcron5.1.log 2>&1
59 16 * * 1-6 . $HOME/.profile; /bin/bash /home/tom/bin/recordTV.sh 5.1 KING-TV5.1NewsAt5PM 32 > /home/tom/tempcron5.1.log 2>&1
59 22 * * * . $HOME/.profile; /bin/bash /home/tom/bin/recordTV.sh 5.1 KING-TV5.1NewsAt11PM 32 > /home/tom/tempcron5.1.log 2>&1
59 11 * * 1-5 . $HOME/.profile; /bin/bash /home/tom/bin/recordTV.sh 7.1 KIRO-TV7.1NewsAtNoon 32 > /home/tom/tempcron7.1.log 2>&1
59 17 * * 1-5 . $HOME/.profile; /bin/bash /home/tom/bin/recordTV.sh 7.1 KIRO-TV7.1NewsAt6PM 32 > /home/tom/tempcron7.1.log 2>&1
59 22 * * * . $HOME/.profile; /bin/bash /home/tom/bin/recordTV.sh 7.1 KIRO-TV7.1NewsAt11PM 32 > /home/tom/tempcron7.1.log 2>&1
29 17 * * 1-5 . $HOME/.profile; /bin/bash /home/tom/bin/recordTV.sh 9.1 KCTS-TV9.1NewsAt530PM 92 > /home/tom/tempcron9.1.log 2>&1
59 7 * * 1-5 . $HOME/.profile; /bin/bash /home/tom/bin/recordTV.sh 13.1 KCPQ-TV13.1NewsAt8AM 32 > /home/tom/tempcron13.1.log 2>&1
59 21 * * * . $HOME/.profile; /bin/bash /home/tom/bin/recordTV.sh 13.1 KCPQ-TV13.1NewsAt10PM 32 > /home/tom/tempcron13.1.log 2>&1
__________________
If the well is dry and you don't see rain on the horizon, you'll need to dig the hole deeper. (If the antenna can't get the job done, an amp won't fix it.)

(Please direct account activation inquiries to 'admin')

Last edited by GroundUrMast; 7-Nov-2019 at 8:00 PM. Reason: gramar
GroundUrMast is offline   Reply With Quote