On Sunday 23 Sep 2007, Joe Ripley wrote:
> On 9/23/07, Stephen Kitchener <stephen at g6dzj.demon.co.uk> wrote:
> > Hi,
> > I have a strange error, whenever I get cron to run
> > /usr/bin/mythfilldatabase like this
> >
> > (Sorry for the line-wrapping, its supposed to be 2 lines....)
> >
> > 35 10 * * * mythtv /usr/bin/mythfilldatabase
> >
> > > /var/log/mythtv/mythfilldatabase.log 2>&1
> >
> > 45 16 * * * mythtv /usr/bin/mythfilldatabase
> >
> > > /var/log/mythtv/mythfilldatabase.log 2>&1
> >
> > As the mythtv user, ie it's in mythtv's crontab I get written
> >
> > "mythtv: cannot connect to X server" to the log file.
> >
> > Now - when I run the same command "/usr/bin/mythfilldatabase" from
> > mythtv's command line when I am logged in as mythtv, the command works.
> >
> > Can someone please let me know what's going on......
>> If this is being run from mythtv's crontab, you don't need to specify
> the username in the line. What's happening is, the program
> /usr{/local}/bin/mythtv is being run... and that's why you get that X
> error.
>> Your crontab line should look like this:
>> 35 10 * * * /usr/bin/mythfilldatabase /var/log/mythtv/mythfilldatabase.log
> 2>&1
>> Assuming this file is NOT /etc/crontab
Hi,
Thanks for that, I have changed the entries in mythtv crotab, I was getting
other errors, I cannot remember what they were now, but I was trying to make
sure that the entry was run under mythtv's envronment, But I think I got
mixed up with making a file for /etc/cron.daily where you can specify the
user the script runs under....