[mythtv-users] Anyone using in crontab?

Rick rbonafied at gmail.com
Thu Dec 13 18:59:34 UTC 2007


nospam312 wrote:
>> I'm pretty sure this is a path problem - in the first example you're
>> using the system command so it'll inherit the path from the calling
>> process (the perl script, which in turn inherits it from cron, which
>> usually has a minimal path), and in the second example you're using
>> backticks which will spawn a new shell process, picking up the usual
>> profile & bashrc settings.  Try specifying the full path to mplayer in
>> the system command.
> 
> Adding the full path did not help.  I also tried converting the system
> line to a backtick and it worked in the shell but as soon as I use
> cron it failed also.  Any other ideas?  TIA
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
> 

It's still probably an environment problem.  Try doing this... capture
your environment while logged in as you are:

env | sort > myenv.loggedin

Then setup a cron to do the same thing:

env | sort > myenv.fromcron

Then compare.

Keep in mind that when you have an interactive shell you gone through a
bunch of initiation scripts that cron doesn't do.  Things like:
/etc/profile, /etc/profile.d/*, /etc/X11/xinit.d/* .  Most of these
things won't be used by a job started by cron.

I hope that helps...

Rick


More information about the mythtv-users mailing list