What’s the Easiest Way to Run a Python Script 24/7 in the Cloud for API Calls?

0
11
Asked By TechSavvyPanda On

I'm looking for a straightforward cloud-based solution to run a Python script continuously without relying on my local machine. My script calls an API for tracking transit vehicles, and I want to ensure that the results are saved reliably. I've heard about AWS Lambda but it's been a bit overwhelming to set up. Here's what I need help with:

* Running a Python script 24/7 without needing my laptop on
* Ensuring the script has continuous internet access to make API calls
* Saving the results from the API calls securely

Is there a simpler approach than AWS Lambda, or some easy setup I'm not seeing? Any recommendations for services or step-by-step tutorials would be appreciated.

5 Answers

Answered By RaspberryGuru On

Why not just get a Raspberry Pi? It can run your script 24/7 and is probably cheaper than most hosting services.

Answered By NodeNinja On

If you're into Node.js, you might consider writing a small program that runs on Linode hosting. Just make sure to manage your disk space for the API results.

Answered By VPSFan99 On

Setting this up on a cheap VPS would be my go-to. You don’t really need those complicated services for what you're trying to do. Just a basic server that's always on will do the job for you.

TechSavvyPanda -

That sounds reasonable! Do you have any VPS providers in mind?

SimpleScriptNerd -

I agree! A VPS can really simplify things.

Answered By CronMaster88 On

Using cron jobs on any VPS will work perfectly. Just remember to modify your script so it executes the API call only once per loop. It should only cost you around $5 a month!

TechSavvyPanda -

Thanks! That price point sounds solid.

RaspberryGuru -

Yeah, cron jobs are super reliable for this kind of task.

Answered By CloudBeginner On

You can also set up AWS Lambda with an EventBridge cron trigger. This method can be pretty low-cost and you can get it working without too much hassle.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.