←back to thread

528 points sealeck | 9 comments | | HN request time: 0.452s | source | bottom
Show context
st3fan ◴[] No.31391017[source]
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.
replies(1): >>31391035 #
1. tptacek ◴[] No.31391035[source]
I'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?
replies(4): >>31391264 #>>31391274 #>>31391522 #>>31391997 #
2. st3fan ◴[] No.31391264[source]
Some 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.
3. DizzyDoo ◴[] No.31391274[source]
The 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....

4. krn ◴[] No.31391522[source]
> 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

replies(1): >>31392311 #
5. joseph ◴[] No.31391997[source]
I'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.
replies(2): >>31392211 #>>31393036 #
6. mrkurt ◴[] No.31392211[source]
Don'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.
7. st3fan ◴[] No.31392311[source]
I 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.
replies(1): >>31392334 #
8. anurag ◴[] No.31392334{3}[source]
Render has persistent disks! https://render.com/docs/disks. We need to expose them for cron jobs though.
9. kevlened ◴[] No.31393036[source]
I'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