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

OCG Technical Support support at ocg.ca
Mon Nov 17 14:15:05 UTC 2008


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...

-----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.
>
>
>
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
>
_______________________________________________
mythtv-users mailing list
mythtv-users at mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users



More information about the mythtv-users mailing list