I have a VPS server to which I connect using Putty. There's a python script that has to be running 24/7. But once I close Putty, the script stops.
Is this how it's supposed to work or am I doing something wrong?
I have a VPS server to which I connect using Putty. There's a python script that has to be running 24/7. But once I close Putty, the script stops.
Is this how it's supposed to work or am I doing something wrong?
For most of the operating systems that you host on your VPS server, with the closing of the putty terminal in your local machine, the process in the server gets killed. For that reason, you need to run the process as a daemon. To make it simpler, you need to run the command in your putty terminal in such a way that if you had control of the remote system's terminal or command line and run a command, closing the terminal or the command line doesn't kill the process there. How to do it is dependent on the operating system that is hosted on the server. Here is a way to start in Unix. Other operating systems enable you to do the same in more or less similar ways, which I will leave for you to research.