Welcome to the MMOLEARN.COM

Build your first Dropshipping, Online Course, Affiliate, Blog, Business, Optin, etc, WEBSITE and make money with us. We offer over 10.000+ Wordpress Plugins & Themes which will let you build ANYTHING. Plus we have nice community which likes to gossip about building websites and making some money online! Its really easy to do when we have everything you need to BUILD anything you WANT. Hope you enjoy your stay and have a beautiful day with us!

or Register

What is the optimal approach for executing a Python script continuously, 24 hours a day, and what is the best platform to use for this purpose?

Galergro

Well-known member

VIP MEMBER
Reputation: 32%
Joined
Feb 16, 2017
Messages
210
Reaction score
42
Points
66
Hello everyone, I have eight scripts that I need to run continuously for two months. In your opinion, which service is the most suitable for this task?

I'm not sure if PythonAnywhere allows for running only one script per web app, or if DigitalOcean can meet my requirements. Can you please advise me on the best option? Thank you.
 

HellSee

Well-known member

VIP MEMBER
Reputation: 29%
Joined
May 25, 2016
Messages
186
Reaction score
38
Points
70
The adequacy of a small VPS will ultimately rely on the specific script being used.
 

Polyves

Well-known member

VIP MEMBER
Reputation: 24%
Joined
Dec 1, 2019
Messages
158
Reaction score
25
Points
57
The adequacy of a small VPS will ultimately rely on the specific script being used.
Scripts are extremely straightforward, involving continuous posting on certain Instagram profiles around the clock.

Which VPS do you suggest? Alternatively, a cloud service like Replit and similar options may be suitable.
 

Kinector

Active member

VIP MEMBER
Reputation: 15%
Joined
Jul 16, 2018
Messages
115
Reaction score
12
Points
27
Feel free to choose any option that fits within your budget or that you know how to set up; simply proceed with that choice.
 

Paychal

Well-known member

Reputation: 24%
Joined
Oct 16, 2018
Messages
164
Reaction score
21
Points
52
Feel free to choose any option that fits within your budget or that you know how to set up; simply proceed with that choice.
I am using a VPS with dual cores. On this VPS, I have set up VS Code, turned off automatic updates, and currently have my script running. Are there any potential problems I should anticipate? What measures can I implement to ensure my scripts don't halt unexpectedly?
 

Landrater

Active member

Reputation: 18%
Joined
May 22, 2018
Messages
131
Reaction score
14
Points
38
I am using a VPS with dual cores. On this VPS, I have set up VS Code, turned off automatic updates, and currently have my script running. Are there any potential problems I should anticipate? What measures can I implement to ensure my scripts don't halt unexpectedly?
Is it possible to execute this in the terminal, or why use vscode instead?

 

AlliLove

Active member

Reputation: 21%
Joined
Jun 11, 2019
Messages
154
Reaction score
19
Points
41
I use a Raspberry Pi, which draws power from the USB port on my home router and is connected to the Ethernet port. It functions exceptionally well.
 

Nexxedara

Well-known member

Reputation: 36%
Joined
Jul 9, 2017
Messages
229
Reaction score
53
Points
76
I use a Raspberry Pi, which draws power from the USB port on my home router and is connected to the Ethernet port. It functions exceptionally well.
What is the cost?
 

RaeLaugh

Well-known member

Reputation: 29%
Joined
Aug 19, 2021
Messages
183
Reaction score
37
Points
69
The most straightforward approach involves containerizing the scripts using Docker and executing them through Docker Compose. By including the "restart: always" or "restart: unless-stopped" attribute for each container in the Docker Compose file, the containers will automatically restart after script execution. This method also eliminates concerns about Python versions and virtual environments since everything is virtualized.

Regarding hardware options, you could consider obtaining an inexpensive VPS or even a Raspberry Pi 4.
 
Top Bottom