Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running Python script continously 24/7 on the cloud

Is there any solution for my needs? Basically, I'm running the script that runs a certain function with APScheduler. So the script will run a function every 5 minutes.

PythonAnywhere can't do that because they don't support the APScheduler.. And it's very bad practice if we use an infinite loop on PythonAnywhere.

like image 336
masbro Avatar asked Oct 17 '25 15:10

masbro


1 Answers

You can try Heroku and its Worker Dynos.

I found it much simple to set up than other services like AWS or Google Cloud Platform. You can have a basic account for free and play around.

They have as add-on Heroku Scheduler, which would allow you to avoid the infinite while.

Heroku Scheduler

Run scheduled tasks every 10 minutes, every hour, or every day. Starting at $0/mo.

Run Jobs with Ease

Scheduler is an add-on for running jobs on your app at scheduled time intervals, much like cron in a traditional server environment.

like image 122
J0ANMM Avatar answered Oct 20 '25 16:10

J0ANMM