[mythtv-users] mythfilldatabase runs from command line, but not from cron

David Watkins watkinshome at gmail.com
Wed Nov 14 14:10:18 UTC 2007


On 14/11/2007, Nick Morrott <knowledgejunkie at gmail.com> wrote:
> On 14/11/2007, David Watkins <watkinshome at gmail.com> wrote:
> > > Is there a command or syntax I can use to ensure that the cron job
> > > executes the script with the same environment settings as the user?

I just remembered something that caught me out.  After running the
script manually the xml data file is owned by your local user and,
depending on the permissions, maybe cron can't overwrite it when
running as root?  (I'd assumed that root could overwrite anything but
of course it can't)

Try manually deleting the xml file before the cron job runs.

If this is the case then you can fix it either by deleting the file at
the end of your script, once mythfilldatabase has run, or use
~/outputfile in your script instead of /home/media/outputfile.


More information about the mythtv-users mailing list