[mythtv-users] Mythfilldatabase cron job fails

jack snodgrass mrlinuxgroups at gmail.com
Fri Dec 1 17:32:29 UTC 2006


On 11/30/06, Paul Shepherd <paul at whitelands.org.uk> wrote:
> I am new to Linux+mythtv so this maybe a simple question.
>
> I have install latest version of mythtv on a pc running FC6 with KDE.  I
> have manually run mythfilldatabase from the terminal (probably su as
> root) and that worked fine.
>
> I have set up a cron job called mythtv_update as follows:
>
> ----------------------
> #!/bin/bash
>
> export QTDIR=/usr/lib/qt-3.3
> su - mythtv -c "mythfilldatabase --no-delete" >
> /var/log/mythtv/mythfilldatabase.log 2>&1
>
> # The minimum number of days you will allow before you
> # want to receive a notification message
> MIN_DAYS=3
> .
> .... etc
> ----------------------
>
> When the cron job runs I get email error msg as follows:
>
> ----------------------
> /etc/cron.hourly/mythTV_update:
>
> ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
> password: NO)
> ----------------------
>
>
> The file mythfilldatabase.log contains:
>
> ----------------------
> This account is currently not available.
> ----------------------
>
> A related question is where should I put the freeview.xmltv file
> containing the channel list - I put it in /var/lib/mythtv which is the
> home directory for mythtv ? Not sure this is right.
>
> Hope my explanation makes sense - so what am I doing wrong? Thanks in
> advance.
>
> Paul
>

on cron... cron uses different enviorment variables than you get when you login
via bash. You may have to do a
set > /tmp/set.listings
in your script to see what variables are set when cron runs. You may need to
do a
export USER=mythtv
or something like that.

getting a script to run from cron is not as easy as it sounds. ;)

Also... why not set this up as a cron job for the mythtv user? why
root and su - ?
... probably won't make a difference but why...

jack


More information about the mythtv-users mailing list