<div dir="ltr"><div dir="ltr">On Tue, 23 Apr 2019 at 03:52, Daryl McDonald <<a href="mailto:darylangela@gmail.com">darylangela@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Having the script in /etc/cron.daily doesn't seem to be functional, I'd like to have the database optimize itself just before the nightly auto-shutdown. What is a good way to accomplish this?  It's mythtv fixes 0.29 on Ubuntu desktop 18.04.  TIA  Daryl</div></blockquote><div><br></div><div>You say having the script in /etc/cron.daily is not functional, but you haven't entirely explained what you mean by that.</div><div><br></div><div>IMHO, using the mythbackend shut-down event, as discussed elsewhere in this thread, could possibly be problematic.<br></div><div><br></div><div>Also IMHO, you might be better off looking at installing anacron to enable the DB optimisation, which will ensure that the DB optimisation script is run, at most, every x days, soon after boot (configurable delay) if the last execution time is greater than x days.</div><div><br></div><div>As far as I know, the default packages for Ubuntu like systems will allow you to install anacron and place the Perl script (or a symlink to it) in /etc/cron.daily, which will automatically be handled by anacron if you have installed the anacron package alongside the standard cron package.<br></div><div><br></div><div>Cheers, Ian</div><div><br></div></div></div>