[mythtv-users] Re: scheduled mythfilldatabase errors. manual mythfilldatabase runs fine (tv_grab_au)

Phill Edwards philledwards at gmail.com
Wed Jan 26 17:56:57 EST 2005


> Wow!  That worked :P
> 
> For the record, I have a file in /etc/cron.d/ called mythfilldatabase
> which contains...
> 7 */12 * * * root sh /usr/local/bin/scheduledmythfilldb.sh
> 
> ..and the /usr/local/bin/scheduledmythfilldb.sh script contains...
> #!/bin/bash
> 
> export PATH=$PATH:/usr/local/bin/
> 
> mythfilldatabase
> 
> ...and everything is working sweet as :P

I think you might find that while /usr/local/bin is in the PATH for
your myth user, the cron job is beibng run as root and it's not in
root's PATH. You could check this by logging on as root and looking at
$PATH.

Why is executing as root? Because it's in /etc/cron.d/ - I think these
jobs execute as root as it doesn't know which other user to execute
them as. There may be a way to tell it but I don't know what that is.
If it was in myth's crontab it would have executed as myth and the
problem would probably not have occurred.

Regards,
Phill


More information about the mythtv-users mailing list