By hjmeulenbelt
Hi all,
I have a Droplet with the following specifications:
4 GB Memory / 50 GB Disk / AMS3 - Ubuntu 20.04 (LTS) x64
When I access the Console with my non-root username I run the python script using
python3 scheduler.py
The script should run all day but as soon as I exit the Console (or Terminal), the scripts stops. I know this because there is no new data added to my database. The same script works fine when it runs on my local computer. What am I doing wrong or which settings should I change?
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!
Accepted Answer
Hi @hjmeulenbelt,
How do you run the Script? Do you just run python3 scheduler.py in your Terminal, do you add a Screen session or use PM2? If you are not, there are a couple of ways to go.
The first and easiest to go is, to open a Screen session in your Terminal to start the scrip and then detach from that Screen session. Take a look at the following tutorial:
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.