Ask coding questions

← Back to all posts
How to make a Python program run once every day without the Hacker plan
piphi

Hi Replit,

Does anyone know how I could make make a Python program run once every 24 hours without me having to have my computer on and having to press the run button? BTW, I need to do this without the Hacker plan, so no Always On feature for me.

Thanks!

Voters
piphi
Comments
hotnewtop
SixBeeps

You could set up a web server that gets pinged by UptimeRobot every few minutes or so. Then on that server, write a scheduler that executes your program every 24 hours.

piphi

@SixBeeps How do I write a scheduler on a website/server? Could you show an example?

Thanks!

SixBeeps

@piphi Actually now that I think about it, it might be better to have the scheduler and the server running as two separate entities.

Learn how to make a Flask server so that you can use UTR to ping it. Then, take a look at this StackOverflow post about scheduling things in Python.