Jump to content

More control over scheduled tasks


Boredcat

Recommended Posts

Boredcat

I feature that I am missing right now is the ability exact control when the scheduled tasks run.

 

For example the scan media library runs every 4 hours and on application startup.

 

This perfect except that when I do a application restart  (an new version is available) from MB Classic, the scan media library puts my server CPU to the roof and causing streaming issue (especially stream from USB).

 

So what I would would suggest is that a tasks can be scheduled like runs every 4 hours and on application startup and time is between xx:xx and xx:xx hours. That makes that if I restart the application at 08:00 PM if have no issue's with the stream.

The most ideal would be if it can be scheduled on a daily base, so I have a different schedule on Saturday then on Monday.

 

 

Link to comment
Share on other sites

How does the scan perform during normal operation? The only time it should have high cpu usage is right after a new update, because sometimes there are changes that require a re-scan.  And just so we're clear, we notify you when a server restart is needed, but you can wait as long as you want until you actually do it.

Link to comment
Share on other sites

I think we have pretty good scheduling control now.  Definitely covers 90% of users so the benefit of additional control would have to be weighed against not only the cost of implementing it but also the increased complexity for those 90%.

 

If you are just about to watch something, just don't re-start the server.  Wait until you are done :).

Link to comment
Share on other sites

CashMoney

Funnily enough I was talking with someone about this today, as I've set them up with MB3, which they love, but they too was wondering if there was a way to do something about all the updates popping up when they want to watch something. My answer was the same as ebr's; If you're about to watch something, don't restart the server/update, just wait till you're done. To which they replied, "but then I don't update because I forget until the next time I want to watch something. Can't you set it to auto update and restart at a specific time?"

 

Have to say, not a bad idea and would solve OP's issue as well. Perhaps have an auto update feature that can be enabled and set to run on a schedule, so that for example, 3:00am - update, 3:30am restart server. Of course that would also mean preventing clients showing server updates, and of course it wouldn't prevent client updates from popping up .... but maybe this could be done with the server and MBC and/or MBT at least?

Link to comment
Share on other sites

The automatic updates actually already are there.  The thing that would need to be added is a scheduled task to restart the server.  We have discussed adding that in the past.  The issue, of course, is what if someone is watching something at the time the server restarts?

Link to comment
Share on other sites

I just put up a beta plug-in for a scheduled server restart.  Give it a whirl if you wish.

 

Of course, the server has to be running/awake at the scheduled time for this to occur...

  • Like 4
Link to comment
Share on other sites

The only reason why MBC has a prompt is because Ebr has no ability to control how the individual themes present it. If he had control over that then it would be done in a much better way.

 

In MBT for example, there is no prompt. It's an icon that lights up in the top-right hand corner of the screen. You can't miss it, but at the same time, it's very easy to ignore if you don't want to restart. I think that's the better way to go, but it's just not possible with MBC because the old theme developers aren't around.

Link to comment
Share on other sites

Plus every single client now notifies when the server restarts. And they do it in ways that allow you to decide when to restart (except for my comments above). Given that, I don't see much need to automate it.

Link to comment
Share on other sites

CashMoney

The automatic updates actually already are there.  The thing that would need to be added is a scheduled task to restart the server.  We have discussed adding that in the past.  The issue, of course, is what if someone is watching something at the time the server restarts?

But if its a scheduled task, wouldn't people just choose times when no one would be likely to watch? Say 4am or something. Also, might be just MBC but I've restarted the server during playback a few times (by mistake ..... don't ask ;-) ) and had no issues as long as the server was finished restarting before playback finished. Is that not supposed to happen?

 

Don't get me wrong, I agree with you ebr, and as Luke says MBT is different. Plus even if this was to happen for the server, it wouldn't help with popups about client and client plugin updates. But I've had discussions about this with 3 others now who all asked about auto updates, and thought it might be useful to the OPs post. :-)

Link to comment
Share on other sites

Server re-starts aren't a problem for MBC because we play content directly.  It would only be a problem if you were streaming to a mobile client or a Roku or something that can't play directly.

 

If Luke doesn't want a restart task in the core, then I suppose I could whip up a plug-in...

Link to comment
Share on other sites

I don't want it right now, because I think we can solve the problem by improving the way clients present it. Then everybody gets the improvement, as opposed to the few who will notice and enable an advanced setting. Throwing a setting in is just the path of least resistance. But of course, if Ebr wants to do a plugin, then great.

Link to comment
Share on other sites

I think, for the average user, an automatic re-start at a scheduled interval is a much easier path for them and is more likely to keep their software up to date.

 

Users tend to ignore or overlook subtle clues like a blue restart icon.  Or, they just may never know what it means when it is blue or flashing or whatever.

Link to comment
Share on other sites

Did anyone try out the plug-in?  Worked for me last night :).  

 

I think I'm going to like this as, whenever you start up a client, you have watching something on your mind, not maintaining your environment.  So, you put off the restart and then forget about it until the next time you start up a client, but then you want to watch something...

Link to comment
Share on other sites

gthrift

Worked well for me.   Set it to 4am and set application and plugin update to 2am.  Should make it so I never see server restart popup.

 

Very nice, ebr.

Link to comment
Share on other sites

CBers

Did anyone try out the plug-in?  Worked for me last night :).  

 

I think I'm going to like this as, whenever you start up a client, you have watching something on your mind, not maintaining your environment.  So, you put off the restart and then forget about it until the next time you start up a client, but then you want to watch something...

 

Yep, it restarted for me overnight.

Link to comment
Share on other sites

CashMoney

Sorry for late reply. Busy week so I completely missed this until today when I was checking out the plugins in the dashboard and explaining to a friend that we might get a restart plugin; said friend/customer was most impressed that it was already there :) He says thank you very much.

 

As do I. The more I thought about it, the more I thought it could be handy for myself. Just installed it. :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...