Jump to content

Run at Startup Delay


TolkienBard

Recommended Posts

TolkienBard

It would be helpful if there was an option to assign a period of time for Emby Server to delay before launching at startup. It's not a huge deal, but without the option, I have run into Emby Server getting itself up and running faster than my storage pool does sometimes, and that has caused odd complications on more than one occurrence. 

  • Like 1
Link to comment
Share on other sites

Scott D

I found this in a post in the past.  I am not taking credit for this, but wanted to pass it on.  It has worked well for me since I have had the same problem as you.

 

You will need to modify it to fit your particular set-up, but it should be fairly straight forward.  Copy this into a start-up .bat file.  Disable the "Run at Start-up" option in Emby.

 

I am assuming you are running on a Windows machine.  You did not specify, so sorry if this is not the case.

 

 

@@Echo Off
TITLE EMBY Check and Start-Up
:START
set MyDriveOne=L
set MyDriveTwo=M
set MyDriveThree=N
set MyDriveFour=O
set MyDriveFive=P
set MyDriveSix=Q
set MyDriveSeven=R
==============================================
:DRIVEONE
IF EXIST %MyDriveOne%:\NUL goto DRIVETWO
echo DRIVE L DOWN...
PING 1.1.1.1 -n 1 -w 3000 >NUL
goto :DRIVEONE
==============================================
:DRIVETWO
IF EXIST %MyDriveTwo%:\NUL goto DRIVETHREE
echo DRIVE M DOWN...
PING 1.1.1.1 -n 1 -w 3000 >NUL
goto :DRIVEONE
==============================================
:DRIVETHREE
IF EXIST %MyDriveThree%:\NUL goto DRIVEFOUR
echo DRIVE N DOWN...
PING 1.1.1.1 -n 1 -w 3000 >NUL
goto :DRIVEONE
==============================================
:DRIVEFOUR
IF EXIST %MyDriveFour%:\NUL goto DRIVEFIVE
echo DRIVE O DOWN...
PING 1.1.1.1 -n 1 -w 3000 >NUL
goto :DRIVEONE
==============================================
:DRIVEFIVE
IF EXIST %MyDriveFive%:\NUL goto DRIVESIX
echo DRIVE P DOWN...
PING 1.1.1.1 -n 1 -w 3000 >NUL
goto :DRIVEONE
===============================================
:DRIVESIX
IF EXIST %MyDriveSix%:\NUL goto DRIVESEVEN
echo DRIVE Q DOWN...
PING 1.1.1.1 -n 1 -w 3000 >NUL
goto :DRIVEONE
===============================================
:DRIVESEVEN
IF EXIST %MyDriveSeven%:\NUL goto DRIVESFOUND
echo DRIVE R DOWN...
PING 1.1.1.1 -n 1 -w 3000 >NUL
goto :DRIVEONE
================================================
:DRIVESFOUND
cls
echo ALL IS GOOD...
pause
start C:\Users\Scott\AppData\Roaming\Emby-Server\System\MediaBrowser.ServerApplication.exe
exit
Link to comment
Share on other sites

This is something that needs to be provided by the OS or environment or, as above, by using some sort of batch file or script.

 

All our startup functionality does is put the executable into the system's list of applications to start at login.  Exactly how this works is up to each OS.

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