[mythtv-users] mythfilldatabase works by hand, fails from cron

Joseph A. Caputo jcaputo1 at comcast.net
Wed May 5 13:35:00 EDT 2004


On Wednesday 05 May 2004 10:30, Chris Thompson wrote:
> I am within striking distance of having mythtv ready for prime time.
> I've got a slight snag with mythfilldatabase, however.
>
> Fedora system, set up to Jarod's specs.
>
> I put the following line in crontab:
>
> 15 4 * * * ct /usr/bin/mythfilldatabase
>
> ct is the user with all the permissions, and with the right xmltv
> data in ~/.mythtv.
>
> When the ct user runs mythfilldatabase by hand, all is well. When
> that cron runs, however, it fails, and mythweb shows...
>
>  Last mythfilldatabase run started on 2004-05-05 04:32 and ended on
> 2004-05-05 04:32. FAILED: xmltv returned error code 256.
> There's guide data until 2004-05-12 00:00 (7 days).
>
> I thought perhaps it was something to do with the ct user, so I put a
> mythfilldatabase script in /etc/cron.daily which reads:
>
> #!/bin/sh
> /usr/bin/mythfilldatabase
>
> EXITVALUE=$?
> if [ $EXITVALUE != 0 ]; then
>     /usr/bin/logger -t mythfilldatabase "ALERT exited abnormally with
> [$EXITVALUE]" fi
> exit 0
>
> This, of course, is run as root, so I copied the DirecTV.xmltv file
> into /root/.mythtv.
>
> If the root user runs /etc/cron.daily/mythfilldatabase by hand, it
> runs fine. When cron fires it off, I get the error you see above
> about error code 256.
>
> Any ideas? is there some environment variable that's not being set by
> cron that needs to be set? This is one of only three glitches that
> I've got left now.


You might want to set the SHELL, PATH and HOME environment variables.

Also, are you using CVS?  The CVS version of mythbackend has the ability 
to run mythfilldatabase for itself; no need to set up a cron job.

-JAC


More information about the mythtv-users mailing list