6 ms·
For me the missing bit in Fly is scheduled tasks. I know how to solve this by spinning up an app that runs permanently as a scheduler, but basic cron-like sched
by st3fan 4y ago
For me the missing bit in Fly is scheduled tasks. I know how to solve this by spinning up an app that runs permanently as a scheduler, but basic cron-like scheduling should be part of the platform IMO. All other FaaS-like service do this.
- tptacek 4y agoI'd love to do this, if for no other reason than I hate working with cron. What would you use it for? What would the ideal version of this feature look like for you? What kind of apps would you be more easily able to ship? Is it mostly so you wouldn't need to keep a single tiny running VM sitting around running cron?
- st3fan 4y agoSome apps are just that - a periodic task. Nothing more. Ideally a task project would have a git repo with a short fly.toml, a requirements.txt and a main.py. (In case of Python. I'm not familiar with using other languages on fly.io) I don't think it needs to be more complicated than that.
- DizzyDoo 4y agoThe sort of things I have had running on a schedule (using Celery[0] or something like it) are sending a set of emails at a certain time, running a report or generating the data for reports, even running a backup of some data. [0] - https://docs.celeryq.dev/en/stable/userguide/periodic-tasks.html https://docs.celeryq.dev/en/stable/userguide/periodic-tasks....
- krn 4y ago> What would the ideal version of this feature look like for you? I think that Render solved "Cron as a Service" beautifully: https://render.com/docs/cronjobs https://render.com/docs/cronjobs
- st3fan 4y agoI would use render but fly.io persistent storage is a killer feature. It is literally 100x simpler to just deal with files on a real file system than having to deal with remote object storage.
- anurag 4y agoRender has persistent disks! https://render.com/docs/disks https://render.com/docs/disks. We need to expose them for cron jobs though.
- joseph 4y agoI'd like to do any one-off job, not only scheduled ones; retrieving data and transforming or storing it, scraping a web page, running a database migration. My biggest annoyance with Fly is the assumption that everything is a long running application.
- mrkurt 4y agoDon't tell anyone, but you can try "fly machines run" (currently only in a new, empty app). Then "fly machine start <id>" to start the thing back up after it exits. It's not released yet, though.
- kevlened 4y agoI'm not sure how Fly handles one-off tasks behind the scenes, but we're building task queues (w/ cron) as a first class citizen at https://tasker.sh https://tasker.sh