<!--/*SC*/DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"/*EC*/-->
<html><head><title></title><style type="text/css"><!-- body{padding:1ex;margin:0;font-family:sans-serif;font-size:small}a[href]{color:-moz-hyperlinktext!important;text-decoration:-moz-anchor-decoration}blockquote{margin:0;border-left:2px solid #144fae;padding-left:1em}blockquote blockquote{border-color:#006312}blockquote blockquote blockquote{border-color:#540000} --></style></head><body><div style="font-family: Arial; font-size: medium;" dir="ltr"><div class="defangedMessage">
        <div id="me93853">
                <div>
                        On Thu, May 10, 2012, at 02:47 PM, Igor Cicimov wrote:</div>
                <blockquote class="me93853QuoteMessage" type="cite">
                        <br />
                        <div class="me93853gmail_quote">
                                On Thu, May 10, 2012 at 2:05 PM, Gabe Rubin <span dir="ltr"><<a href="mailto:gaberubin@gmail.com" target="_blank">gaberubin@gmail.com</a>></span> wrote:<br />
                                <blockquote class="me93853gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                        <div class="me93853im">
                                                <br />
                                                <br />
                                                On May 9, 2012, at 8:48 PM, "Michael T. Dean" <<a href="mailto:mtdean@thirdcontact.com">mtdean@thirdcontact.com</a>> wrote:<br />
                                                <br />
                                                > On 05/09/2012 11:43 PM, Bill Meek wrote:<br />
                                                >> On 05/09/2012 10:33 PM, Gabe Rubin wrote:<br />
                                                >> ...<br />
                                                >>> [mythtv@localhost backup]$ more /home/mythtv/.mythtv/backuprc<br />
                                                >>> DBBackupDirectory=/home/mythtv/.mythtv/backup<br />
                                                >>><br />
                                                >>> And the command works from the command line. It just seems that none<br />
                                                >>> of my cronjobs are functioning.<br />
                                                >><br />
                                                >> But isn't your cron job running as root? If so, there<br />
                                                >> should be a similar entry in ~root/.mythtv.<br />
                                                >><br />
                                                >> At least that would explain why cron fails and command line works.<br />
                                                >><br />
                                                ><br />
                                                 </div>
                                        This is my mythtv cron job. What I pasted in my first email was from running crontab -e as the mythtv user.<br />
                                        <div class="me93853im">
                                                <br />
                                                > And/or you need to specify a value for HOME to point to /home/mythtv<br />
                                                ><br />
                                                > (without a valid HOME, nearly all things MythTV will fail--including <a href="http://optimize_mythdb.pl" target="_blank">optimize_mythdb.pl</a> and <a href="http://mythconverg_backup.pl" target="_blank">mythconverg_backup.pl</a>)<br />
                                                ><br />
                                                 </div>
                                        I am not sure I understand what this means. And does it change anything that the cron job is running as mythtv?<br />
                                        <div class="me93853HOEnZb">
                                                <div class="me93853h5">
                                                        _______________________________________________<br />
                                                        mythtv-users mailing list<br />
                                                        <a href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a><br />
                                                        <a href="http://www.mythtv.org/mailman/listinfo/mythtv-users" target="_blank">http://www.mythtv.org/mailman/listinfo/mythtv-users</a></div>
                                        </div>
                                </blockquote>
                        </div>
                        <br />
                        <div>
                                It's a shell thing. So have in mind that when you run the cronjob it runs without shell so it doesn't inherit your environment settings which explains why it is successful from the shell command line and fails from cron.</div>
                        <div>
                                 </div>
                        <div>
                                You need to source your <span style="">/home/mythtv/.mythtv/backuprc file first. So try putting the cron like this:</span></div>
                        <div>
                                 </div>
                        <div>
                                <span style="">30 3 * * * . </span><span style="">/home/mythtv/.mythtv/backuprc && </span><span style="">/usr/bin/</span><a href="http://mythconverg_backup.pl/" style="" target="_blank">mythconverg_backup.pl</a></div>
                        <div>
                                 ^</div>
                        <div>
                                (yes, that's a dot then a space then the rest of the line here)</div>
                        <div>
                                 </div>
                        <div>
                                Igor</div>
                        <div>
                                 </div>
                        <div>
                                 </div>
                        <div>
                                <u>_______________________________________________</u></div>
                        <div>
                                mythtv-users mailing list</div>
                        <div>
                                <a href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a></div>
                        <div>
                                <a href="http://www.mythtv.org/mailman/listinfo/mythtv-users">http://www.mythtv.org/mailman/listinfo/mythtv-users</a></div>
                </blockquote>
        </div>
</div>
<div>
         </div>
<div>
        Mine wouldn't backup from cron if there is an error in the database - like a channel improperly closed, etc. If you go to mythweb and do a database check, are they all OK? If not, then fix and then see what happens. </div>
<div>
         </div>
<div>
        <div>
                --</div>
        <div>
                Kris B.</div>
        <div>
                <a href="mailto:krisbee@krisbee.com">krisbee@krisbee.com</a></div>
        <div>
                 </div>
</div>
<div>
         </div>
</div></body></html>