[mythtv-users] Scheduler failing...

Nick Morrott knowledgejunkie at gmail.com
Mon Feb 2 23:16:19 UTC 2009

On 02/02/2009, William Uther <willu.mailingLists at cse.unsw.edu.au> wrote:
> Hi,
>   I'm having a very strange mythtv problem.  I've found a similar sounding
> problem in the mailing list archives, but the solution is not the same:
>  http://www.gossamer-threads.com/lists/mythtv/users/295670
>  The problem is that the scheduler does not seem to be running.  I have
> guide data.  I have shows asking to be recorded.  But there is nothing
> actually scheduled to be recorded.  This seems to be able to be fixed, until
> I next reboot, by forcing mythbackend to reschedule.
>  Background:
>  I'm running mythtv on ubuntu jaunty on a new box.  I used this FAQ entry to
> copy the data from a previous ubuntu intrepid install:
>  http://www.mythtv.org/docs/mythtv-HOWTO-23.html#ss23.7
>  If I boot the machine, then `mythtv-status` shows no upcoming recordings,
> and neither does `mythbackend --printsched`.  `mythbackend --testsched`
> however will print a bunch of recordings (but seems to leave the actual
> recording schedule untouched).  If I run mythfilldatabase then this seems to
> force a reschedule and then everything is fine until I next restart the
> machine.  If I hit record on a program, then myth will reschedule and
> everything will be fine.  I can then change that program back to not record
> and everything stays fine.  On restart it all falls apart again.
>  I tried modifying /etc/init.d/mythv-backend to call mythfilldatabase
> immediately after starting mythbackend.  This did not fix the problem.  I
> found that strange, because I thought that just asking for a reschedule
> would fix things.
>  I then tried adding "(sleep 10 ; mythfilldatabase) &" in
> /etc/init.d/mythv-backend immediately after starting mythbackend, and that
> did fix the problem (although this seems to be a little intermittent).
>  So I then wondered if there was a race condition with something that myth
> was relying upon.  I tried adding a sleep 10 just before mythbackend was
> started. That did not fix the problem.
>  If I run MFD and everything is fine, then rebooting causes the problem to
> come back.  Simply restarting mythbackend does not seem to cause the problem
> to come back.
>  I wonder if there is a database schema issue?  (but I don't know why
> forcing a reschedule would help in that case...)  At this point I'm just
> confused.

Have you checked the health of the myth dababase and/or do you
regularly run optimize_mythdb.pl to keep the DB in good shape? If you
haven't, or you don't, please do - even if it doesn't help this
particular issue.

If you disable the mythbackend service, and start mythbackend from a
console once your desktop environment has started, does the issue

What does the mythbackend logfile contain after a reboot and there is
no scheduling? There is a verbose flag for the scheduler - 'schedule'
which you can provide to the logging option:

mythbackend --logfile /var/log/mythbackend.log --verbose

This might be able to shed some light on the cause. One other idea is
to check the output of ps to ensure mythbackend is not being started
on boot with any options that might be interfering with scheduling.


Nick Morrott

MythTV Official wiki:
MythTV users list archive:

"An investment in knowledge always pays the best interest." - Benjamin Franklin

More information about the mythtv-users mailing list