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

Dave M G martin at autotelic.com
Wed Nov 14 03:22:16 UTC 2007


fiztlen, John, David,

Thank you for your responses.

The cron job is executing at the right time every day. So it is not the 
Ubuntu bug suggested.

I have run various tests, and by watching activity in "top", can see 
that the tv_grab_jp and mythfilldatabase are running.

And lastly, the XML generated does not seem to be malformed. It closes 
with a </tv> tag.

I think the issue is something to do with the cron environment being 
different from my user environment. It's the only explanation I am left 
with. Every attempt to run any command from the command line works, and 
the cron job is executing, it just seems that the cron job is unable to 
do everything the same as the user shell.

I tried adding the user name in front of the command, as someone 
suggested, like so:

0 11 * * * media /home/media/scripts/getschedule.sh

(where "media" is my user name).

But that does not seem to have done it.

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?

Thank you for any advise.

-- 
Dave M G


More information about the mythtv-users mailing list