Jellyfin Forum
Scheduled Restart - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: General Questions (https://forum.jellyfin.org/f-general-questions)
+--- Thread: Scheduled Restart (/t-scheduled-restart)



Scheduled Restart - Checkerknight - 2025-03-01

Not sure if this belongs in feature requests, but is there currently a way to have Jellyfin do scheduled auto restarts? The Jellyfin app doesn't always seem to close on some of my Chromecast devices and occasionally users are left logged in and even paused on a movie (most likely user error) which causes constant hard drive activity and Id like to mitigate that.


RE: Scheduled Restart - TheDreadPirate - 2025-03-01

What OS is the server running on? Jellyfin, itself, does not have a way to do this but if you are running Jellyfin in Linux or Docker you can setup cronjobs to do periodic restarts.

It has been a while since I've been a Windows admin, but I recall that Windows SERVER also had ways to setup scheduled tasks. But I'm not sure non-server Windows editions can do that.


RE: Scheduled Restart - Checkerknight - 2025-03-01

The server is running on my raspberry pi, so Linux. I thought worse case to just restart the pi, but if there a way to just restart Jellyfin?


RE: Scheduled Restart - TheDreadPirate - 2025-03-02

If it is installed as a service, not with Docker, you could simply set up a cronjob on the root user.

Code:
sudo su   # escalate to the root user
crontab -e   # edit the current user's crontab

An example cronjob will be something like this. The time I choose for this example is 4am at the top of the hour. Keep in mind this is 4am for whichever time zone your computer is set to. So make sure you either set your system timezone to your local time or if your system clock is GMT and you want to keep it that way you set the time in the cronjob accordingly.

Code:
0 4 * * * systemctl restart jellyfin

Save and quit like you would from a text editor.

That's it. Now Jellyfin will restart at 4am every day.


RE: Scheduled Restart - Checkerknight - 2025-03-04

I just went ahead and added this into my crontab, and funny enough 4am works just fine for me. Just have to wait around and make sure it takes effect but as long as it runs this was exactly what I was looking for! Thank you so much