Is there a way to periodically run a process?

I’m building a web service with Fly.

I want my service will need to perform some tasks periodically; For example, it will have to check several feeds every few hours. Once a day, it will need to run a task which issues notifications.

My app is written in Python and runs from a Docker container. I want to be able to schedule things to be run in a vaguely ‘cronish’ style.

I see a feature called “Scheduled Machines”, which looks approximately correct, but do I really want a new machine? I want an additional process for my existing machine.

Is there a way to specify this?

Yes. Essentially instead of starting your app, you start an script or program that starts multiple processes. See: Running Multiple Processes Inside A Fly.io App · Fly Docs. Since you are using Python, the following might be helpful: Honcho: manage Procfile-based applications — honcho 1.1.0 documentation

1 Like