Scheduling Daily call

From NLTiVo

Jump to: navigation, search

Normally your TiVo decides when a 'phone home' to update the guide-data is taking place. This is not a problem if your TiVo has two weeks of guide-data. The fact is that currently we have five or six days of guide-data available. That's why some people want this call to be made as soon as new data becomes available. However, it should not be necessary to schedule a daily call, unless the amount of days of available guide-data should drop to two or three. This howto describes how to schedule a daily call at a specific time using cron:

Create a file called daily_call.tcl and put it in /var/hack/:

#!/tvbin/tivosh

# daily_call.tcl
#
# Starts a Daily Call, if one is not already in progress.
# Intended to be called from cron.
# cron can be downloaded from here: ftp://ftp.alt.org/pub/tivo/dtype/
# e.g. the following line in crontab will force a call at 8am GMT every Sunday:
# 0 8 * * 6 /var/hack/daily_call.tcl > /var/log/daily_call &
# Save this file to /var/hack and run 'chmod +x /var/hack/daily_call.tcl'
#
# http://www.ljay.org.uk/tivoweb
# LJ @ http://www.tivocommunity.com/
#
# 09Aug04 17:00  v1.0

# Change the port number if your TiVoWeb(Plus) isn't running on port 80
set port 80


exec ifconfig lo up
set chan [socket localhost $port]
puts -nonewline $chan "GET /Dcall HTTP/1.0\r\n\r\n"
flush $chan
set reply [read $chan]
close $chan

Add the following to the crontab (in /var/hack/etc/crontab on my TiVo)

45 20 * * * /var/hack/daily_call.tcl > /var/log/daily_call 2>&1 &
55 20 * * * force_index30.tcl

These lines make sure a daily call is being performed at 20:45. Ten minutes later, a forced index is run. A forced index is necessary to refresh program-guide and the todo-list on your TiVo.

Please vary the starttime of the daily call somewhat to ease the load on the webserver.

Personal tools