Closed dsakura closed 3 months ago
Nevermind, I think little more and solve it. So as not to waste the issue I opened, I will show what I did to anyone else who is interested.
@echo off
call <PC virtual env address>\Scripts\activate.bat
call python <PC sa-drive address>\main.py
Create service using program NSSM.
Run the code:
nssm install <name for the service> "<batch file address/batchfile.bat>
Create log files.
Create folder where you want to place de logs file. Run the code:
nssm edit <service name>
On the nssm window, go to the I/O tab, and fill in the output and error fields adding the address and name for the log files. like: C:\sa-drive-logs\output.log
Click on Edit Service, and then run the command:
nssm start <service name>
Thats it! Many thanks!
I installed it with virtualenv, everything is fine. But if I restart the computer, will I need to run it again or will it start automatically? If not, how can I automate it every time I start the computer? And what command in cmd do I need to run to start the application again?
Many thanks!