<br><br><div class="gmail_quote">On Nov 11, 2007 10:46 PM, Dave M G <<a href="mailto:martin@autotelic.com">martin@autotelic.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
MythTV,<br><br>I have set up a script and a cron job to fetch TV schedule data and fill<br> the MythTV database once a day.<br><br>When I run the script myself from the command line, it works fine, which<br>seems to indicate that the script works perfectly.
<br><br>The script also includes a sendEmail command to let me know it's run,<br>and I get that confirmation at the correct time each day. This would<br>indicate that the cron job is executing properly.<br><br>So, both are working fine, and so together they should operate fine too.
<br><br>But they don't. As days go by, I can see that the schedule is not<br>receiving any new shows since last time I ran the script by hand.<br><br>This is the content of my script:<br>- - -<br>#!/bin/bash<br>/usr/bin/tv_grab_jp --config-file /home/media/scripts/tv_grab.jp.conf
<br>--output /home/media/scripts/jtv.xml<br>/usr/bin/mythfilldatabase --file 1 -1 /home/media/scripts/jtv.xml<br>sendEmail(details omitted for security)<br>- - -<br><br>Here is my crontab entry:<br>0 11 * * * /home/media/scripts/getschedule.sh
<br><br>Inside the mythfontend interface, under Information Center->System<br>Status, there is a note that says:<br>Result: mythfilldatabase ran, but did not inser...<br><br>Unfortunately, the message cuts off, and I can't find any reference to
<br>it in any log file in /var/log/mythtv.<br><br>Speaking of logs, they are mostly empty, and as far as I can tell, don't<br>contain any obvious mention of mythfilldatabase at all, let alone any<br>indicative errors.
<br><br>Very strange. Why would the script execute from the prompt, but not work<br>when run from cron?<br><br>Thank you for any advice.<br><font color="#888888"><br>--<br>Dave M G<br>_______________________________________________
<br>mythtv-users mailing list<br><a href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a><br><a href="http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users" target="_blank">http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
</a><br></font></blockquote></div><br><br>Are you running the cron job as root? Perhaps you should try to run it as the user that owned the command line. <br><br>You shouldm't have to do this though, as Myth handles running the mythfilldatabase automatically.
<br><br><br>