I wrote a guide for running superchronic in a Fly container at Crontab with Supercronic · Fly Docs, which is a drop-in replacement for cron. If you need specificity beyond Fly’s Scheduled Machines feature you’ll want to go down this path since Fly doesn’t have any immediate plans of full-blown cron for scheduling Machines.
I tried to follow the above guide but I get the following error:
Error not enough volumes named app_name_data (1) to run 2 processes
I have the following in my fly.toml file:
`[mounts]
source="app_name_data"
destination="/data"
[[services]]
http_checks = []
internal_port = 8080
processes = ["web"]
protocol = "tcp"
script_checks = []
[services.concurrency]
hard_limit = 25
soft_limit = 20
type = "connections"
[processes]
# The command below is used to launch a Rails server; be sure to
# replace with the command you're using to launch your server.
web = "bin/rails fly:server"
cron = "supercronic /app/crontab"`
I tried autoscaling, but this didn’t work. Any idea why this might be?
Just for reference for anyone using NodeJS I opted for BullMQ which supports repeatable jobs and a lot more like automatic retries etc and because it’s Redis backed (I’m using Upstash for now) you can add as many worker instances as you need, currently I have them a part of my web-app but later might separate as needed