Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tlug] Completely baffled as to why Cron job is not working



TLUG,

I have a machine that is a dedicated media centre, running MythTV.

I have a cron job that runs a script every day at 1 PM. The entry in crontab looks like this:
0 13 * * * /home/mythtv/myscript.sh


In that shell script are three commands. Two are to MythTV related commands that first retrieve TV show information, and then fill the MythTV database with the information.

The third command in that script is an sendEmail command that alerts me to say the script has been run.

Every day, I've been getting an email at 1 PM that tells me the command has been run. So it seems cron is executing my script.

But, I've discovered that the database is not being filled with the right data.

Okay, so obviously the first assumption is that the script is probably not running the command correctly. So I try running the script from the command line, and it works perfectly.

So I'm baffled. Why would a script that runs perfectly from the command line not complete its task when executed from cron?

--
Dave M G
http://www.tlug.jp/wiki/User:Dave_M_G





Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links