2024-02-16, 03:43 AM
(This post was last modified: 2024-02-16, 03:44 AM by Leafies121. Edited 1 time in total.)
well this worked initially, and then windows did a massive update (not 11 thank god.) and even though hdd and network are set to never sleep it still happens now. i then learned task scheduler is just super broken in windows 10 now so i cant even set a task to restart JF every 20 min. this is probably the worst workaround to use but heres what i did.
I made a batch file that counts down and resets jellyfin every 19 min, kills the old processes and starts it again. and added that to startup.
I made a batch file that counts down and resets jellyfin every 19 min, kills the old processes and starts it again. and added that to startup.
Code:
@echo off
Title JellyFin Auto Reboot
G:
cd "G:\program files\jellyfin"
:repeat
REM Countdown timer for 19 minutes
set /a "minutes=19"
set /a "seconds=00"
:countdown
cls
echo Rebooting Jellyfin in %minutes% minutes and %seconds% seconds.
timeout /t 1 >nul
set /a "seconds-=1"
if %seconds% equ -1 (
set /a "minutes-=1"
set "seconds=59"
)
if %minutes% geq 0 goto countdown
echo Rebooting JellyFin
taskkill /f /im jellyfin.windows.tray.exe
taskkill /f /im jellyfin.exe
start jellyfin.lnk
goto repeat