Jump to content

Restart Emby Server - Scheduled Task


thekingswolf
Go to solution Solved by Luke,

Recommended Posts

thekingswolf

Regular updates to both Emby and plugins, and other reasons to restart server.  However I prefer to wait until no one is streaming to restart server, which often means waiting a long time.  Would be nice to be able to set a date/time to restart the server automatically during predictable down times like early am.  

Link to comment
Share on other sites

  • Solution

Hi, if the server requires a restart, we already have a built-in option to automate this, and it will only do so when the system is idle.

  • Like 2
Link to comment
Share on other sites

thekingswolf

ok so how do I manage this mystery option?  The below is already enabled and does nothing no matter how many days go by, this also doesn't work for plugin updates.

 

 

5cde049772fa6_Capture.png

Edited by thekingswolf
Link to comment
Share on other sites

It is the second option on your screenshot. There must have been connected users.

Link to comment
Share on other sites

schmitty

I think thekingswolf means, a scheduled task, separate from installing updates.

 

 

Sent from my iPhone using Tapatalk

Edited by schmitty
Link to comment
Share on other sites

CBers

ok so how do I manage this mystery option? The below is already enabled and does nothing no matter how many days go by, this also doesn't work for plugin updates.

 

Do you use Kodi as your client?

Link to comment
Share on other sites

CBers

I think thekingswolf means, a scheduled task, separate from installing updates.

 

 

There used to be a Server Restart plugin, which would restart Emby when you wanted, but it was deemed unnecessary and was removed,which was a shame, as it worked really well.

  • Like 1
Link to comment
Share on other sites

thekingswolf

I do not have users connected to the server at all times for several days straight.  the restart function does not work as selected.  my request for being able to designate a set restart time remains.

  • Like 1
Link to comment
Share on other sites

It seems to work just fine in my testing. In some cases it could be background sync processes in some of the apps preventing the sessions from idling. That's a separate topic that we're looking into. Thanks.

Link to comment
Share on other sites

  • 1 year later...
Jason'sEmby
On 5/17/2019 at 4:28 AM, CBers said:

There used to be a Server Restart plugin, which would restart Emby when you wanted, but it was deemed unnecessary and was removed,which was a shame, as it worked really well.

This would have been great to have now. As I restart my emby server nightly to release tuners for a known issue. But it's better than having Plex!

Link to comment
Share on other sites

  • 11 months later...
zhongdongy

A work around can be using `cron` jobs. Just set it to restart every day / every a few days at a certain time. But it will restart from a system level and will not respect running tasks (and users streaming it will be kicked out). 

Link to comment
Share on other sites

  • 5 months later...
Happy2Play
On 1/18/2021 at 7:00 PM, Happy2Play said:

Maybe one of the plugin gods could update the plugin.

MediaBrowser/Emby.Restart: Automatic Server Restart (github.com)

@chefhow hard would it be to revive the Restart plugin?

On 1/7/2022 at 5:23 AM, zhongdongy said:

A work around can be using `cron` jobs. Just set it to restart every day / every a few days at a certain time.

But yes one could create their own script and run it on any given schedule.

curl -X POST "http://localhost:8096/emby/System/Restart?api_key={YOURAPIKEY}" -d ""

 

Link to comment
Share on other sites

chef
5 hours ago, Happy2Play said:

@chefhow hard would it be to revive the Restart plugin?

But yes one could create their own script and run it on any given schedule.

curl -X POST "http://localhost:8096/emby/System/Restart?api_key={YOURAPIKEY}" -d ""

 

I'll do it tonight. 

 

Link to comment
Share on other sites

  • 1 month later...
Happy2Play
On 6/16/2022 at 8:52 PM, chef said:

I'll do it tonight. 

 

Any luck on this?

Link to comment
Share on other sites

chef

@Happy2Play

 

Hey! Here is the fixed plugin ready to go! :) 

 

 

If there is anything else I can do for it. Let me know.

Edited by chef
  • Like 1
Link to comment
Share on other sites

emby_fan

How could I use the serverrestart dll?

I‘ve copied it into the plugin folder, but emby server didn‘t load it as plugin ?

thanks for any advice

 

Link to comment
Share on other sites

chef

Yup. Something isn;t correct.

I'll be back :) 

 

EDIT: I see what I did... sorry... quick fix.

Edited by chef
  • Like 1
Link to comment
Share on other sites

Cheesegeezer
2 hours ago, chef said:

Yup. Something isn;t correct.

I'll be back :) 

 

EDIT: I see what I did... sorry... quick fix.

Did it just need the nugets updating? 
the easiest plugin ever lol you need artwork doing lol 😂 

Link to comment
Share on other sites

chef
29 minutes ago, Cheesegeezer said:

Did it just need the nugets updating? 
the easiest plugin ever lol you need artwork doing lol 😂 

No! Something is absolutely wrong with this thing. 😆

It will not load cheese!

I updated all the nugets, added System.Memory, and the thing is broken somewhere.

I don't understand... 

🤦‍♂️ What is happening??

 

It is literally under a 1000 lines of code. 🤦‍♂️

Edited by chef
  • Agree 1
Link to comment
Share on other sites

Happy2Play
4 minutes ago, chef said:

No! Something is absolutely wrong with this thing. 

It will not load cheese!

I updated all the nugets, added System.Memory, and the thing is broken somewhere.

I don't understand... 

🤦‍♂️ What is happening??

 

It is literally under a 1000 lines of code. 🤦‍♂️

Same thing I noticed playing around with it and my copy and paste skills looking at other plugins but never could get it to load.

  • Agree 1
Link to comment
Share on other sites

chef

I'm going to build a new one from scratch.

Then I'll know I have hit all the marks.

It is such a small bit of code, it shouldnt take anymore then 45 mins to get it loading.

Very, very strange...

Unless it is the IApplicationHost... 

It is the only thing in the entire project that might be causing a problem...

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...