By Tunnelvisie
Hi!
Normally when I want to run some piece of code I just open PuTTy, log into my DigitalOcean server and run my python script. However, it seems to me like I have to keep PuTTy open and can’t turn of my pc. Is there any way I can run a command and actually turn of my pc?
My server runs on Ubuntu 16.04.1 x64 if that matters :)
Thanks
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Run your python script in a tmux session like this:
tmux
python /path/to/script.py
Then detach from the session using CTRL+B D and turn off your computer if you want.
When you come back and want to check the session use tmux a to connect to it again.
More about tmux can be found here
Hope this helps.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.