Use NSSM (Non-Sucking Service Manager).
istall service:
nssm install NLP3AP
Configure:
Application Path
C:\inetpub\wwwroot\nlp3\nlp3-env\Scripts\python.exe
Arguments
-m uvicorn main:app --host 0.0.0.0 --port 8003
Startup Directory
C:\inetpub\wwwroot\nlp3
- Click Install Service
- Start service:
net start NLP3API
Now it starts automatically after server reboot.
Using Use Task Scheduler
Create a task:
- Trigger: At Startup
- Program:
C:\inetpub\wwwroot\project\project-env\Scripts\python.exe
- Arguments:
-m uvicorn main:app --host 0.0.0.0 --port 8000
- Start in:
C:\inetpub\wwwroot\project
This starts the API automatically when Windows starts.
Sign up here with your email
ConversionConversion EmoticonEmoticon