[mythtv-users] mythrename.pl fails when called from cron

Mark Wormgoor mark at wormgoor.com
Mon Nov 17 20:39:29 UTC 2008


The answer is obvious from the e-mail below:
1. HOME=/
2. No backends found.  Please copy //.mythtv/config.xml from a working
    MythTV installation instead.

Either set HOME=/root or cp -R /root/.mythtv /

Kind regards,

Mark


OCG Technical Support wrote:
> My crontab is the standard:
> SHELL=/bin/bash
> PATH=/sbin:/bin:/usr/sbin:/usr/bin
> MAILTO=root
> HOME=/
> 
> # run-parts
> 01 * * * * root run-parts /etc/cron.hourly
> 02 4 * * * root run-parts /etc/cron.daily
> 22 4 * * 0 root run-parts /etc/cron.weekly
> 42 4 1 * * root run-parts /etc/cron.monthly
> 
> 
> My script file is sitting in cron.daily
> 
> -----Original Message-----
> From: mythtv-users-bounces at mythtv.org
> [mailto:mythtv-users-bounces at mythtv.org] On Behalf Of Friedrich Clausen
> Sent: November 17, 2008 9:18 AM
> To: Myth TV Users List
> Subject: Re: [mythtv-users] mythrename.pl fails when called from cron
> Importance: High
> 
> Hi,
> 
> On Mon, Nov 17, 2008 at 3:15 PM, OCG Technical Support <support at ocg.ca>
> wrote:
>> I'm using the system /etc/crontab for my script.  I like the ease of use
> of
>> the system crontab...but it looks like this will always run as root (but
> the
>> error suggests otherwise).
>>
>> I'll look for an alternative...
> 
> Can you paste your crontab line? I don't think you need to look for an
> alternative if that works for you. /etc/crontab is quite capable of
> running jobs as any user.
> 
> Cheers,
> 
> Fred.
> 
>> -----Original Message-----
>> From: mythtv-users-bounces at mythtv.org
>> [mailto:mythtv-users-bounces at mythtv.org] On Behalf Of Friedrich Clausen
>> Sent: November 17, 2008 9:05 AM
>> To: Myth TV Users List
>> Subject: Re: [mythtv-users] mythrename.pl fails when called from cron
>> Importance: High
>>
>> Hi,
>>
>> On Mon, Nov 17, 2008 at 2:55 PM, OCG Technical Support <support at ocg.ca>
>> wrote:
>>> I've got a cron job to create links to all of my recordings (for easy
>> access
>>> by Windows clients).  The script runs fine when run from the command
> line,
>>> but fails when cron runs it (with the error below).
>>>
>>>
>>>
>>> Judging from the error, it can't find config.xml (which exists under root
>>> and mythtv accounts).  Does cron run a job as no one?  Looking at the
>> error
>>> the script is looking into "//" which it won't find...
>> It depends - cron will allow you to specify the user if you add the
>> job to a system-wide crontab, for example -
>>
>> * /etc/crontab
>> * /etc/cron.d/mycronjob
>> * /etc/cron.{hourly,daily,weekly}
>>
>> but you can also create cronjobs as a non-root user by executing
>> "crontab -e" as the user you wish to run the cronjob as. If you use
>> the "crontab -e" route then you don't need to specify a user to run
>> the job as.
>>
>> See: "man 5 crontab", "man 1 crontab" and "man cron" for more details.
>>
>> Cheers,
>>
>> Fred.
>>
>>>
>>>
>>> Thanks
>>>
>>> ----------------------
>>>
>>>
>>>
>>> No config found; attempting to find mythbackend via UPnP.
>>>
>>> No backends found.  Please copy //.mythtv/config.xml from a working
> MythTV
>>> installation instead.
>>>
>>> Compilation failed in require at
>>> /usr/src/mythtv-0.21-fixes/mythtv/contrib/mythrename.pl line 22.
>>>
>>> BEGIN failed--compilation aborted at
>>> /usr/src/mythtv-0.21-fixes/mythtv/contrib/mythrename.pl line 22.



More information about the mythtv-users mailing list