Want to run python program for 24 hours

i made a python program which will send me my schedule at specific time my question is how can i run it 24 hours can i use digital ocean for it

By running it 24 hours, do you mean run it for 24 hours or run it every 24 hours?

Don’t run it on your computer.

Depending on what you want to do you have a bunch of different options.

  • Run a server locally.
    • This could be something tiny like a Ras Pi Zero
    • Or it could be something you already have, like maybe a NAS box.
    • Or you could set up a dedicated server to run this python script.
  • Run a server on the Cloud/hosted provider
    • This could be an AWS instance.
    • Or a hosted Ras Pi
    • Or any other hosting service you care to mention.
  • (If you can) convert the script to a serverless capable script

Running a server locally means it is easy to interact with other local resources. However requires high setup and running costs.

Running a server on the cloud generally has less setup costs, but retains the running costs.

Using serverless reduces the running costs for some applications, potentially to nothing. If the task is something that only runs once in a blue moon then it can live within the free tier of Amazon Lambda for example. However does require you to rewrite your application to work in a serverless context.

1 Like

@aniketsharma00411 running 24 by 7 straight