run python script in background server code example
Example 1: nohup python command for linux
nohup python3.7 main.py &
Example 2: how to make a python file run in the background
#Cmd
C:\..\>cd DIRECTORY
C:\..\DIRECTORY>pythonw python.py
#Close in Task Manager