1
votes

[Solved] - It was actually a Linux question

I have an instance on Google Compute Engine that I want to execute 50000 iterations of a Genetic Algorithm. The thing is everytime I lose the SSH connection, it cancels the execution and I don't want it to happen.

I've searched the options and for similar problems on the internet but I couldn't find any help.

Is there any way to keep the execution on the Google Cloud instance even if I'm not connected via SSH?

1

1 Answers

2
votes

This is a Linux question, not specific to GCE. Just use the nohup <command> & pattern. For example, the following command will start a HTTP server on port 8080, even if you disconnect from SSH, it remains running in the background:

nohup python -m SimpleHTTPServer 8080 &