Skip to content

Instantly share code, notes, and snippets.

@OleksiyRudenko
Last active June 9, 2024 18:57
Show Gist options
  • Save OleksiyRudenko/8d193ab2c5bc13a6fad1ba0f38edaa89 to your computer and use it in GitHub Desktop.
Save OleksiyRudenko/8d193ab2c5bc13a6fad1ba0f38edaa89 to your computer and use it in GitHub Desktop.
Cloud cron

does anyone know any solutions to trigger some function (actually a versel function) in the network every (for example) 5 seconds. Let's call it cronjobs... but cronjobs have granularity per minute

Don't suggest Versel's - there granularity is a minute and on the free tariff it's once a day.

I checked a bunch of services.

https://upstash.com/pricing/qstash https://pipedream.com/pricing https://cronhub.io https://zeplo.io/pricing https://www.inngest.com/pricing (the closest to the right one, you can squeeze out 1.6k per day).

All their rates are "Fart, srenk, 500 requests per day" style. Ideally I need a couple tens of thousands per day and free.

While considering options

  • Inngest,
  • Hosting of a triggering node server on fly (Railway is already without free it seems)
  • Hosting of the functionality itself, which I need to trigger every X seconds on the node server (bad that then I start to depend on the tariffs Fly and if my service is used - if not even take off the card, then at least bill and will not give further use until I do not pay, and with Versel like exceed do not exceed - in the next month will give as from scratch to use

Does anyone know by the way what they usually use to trigger something in node every N seconds?


I see that Cloudflare has kronor triggers with no limits, a maximum of 3 kronor per worker, 5 per account. If they support delay, I can get a request every 12-20 seconds

I'd like to make 5 separate requests from one trigger once a minute, at 0 second, at the 10th,... but I can't find what timeouts cloudflare has.


Versel's function + Trigger it even every second from Cloudflare

@OleksiyRudenko
Copy link
Author

Vercel’s cron offering is not very competitive and highly limited. i’d personally recommend using:

  • QStash: create delayed / cron jobs that get sent to an HTTP endpoint of your chosing, like your app hosted on Vercel.
  • Inngest: allows you to create workflows. very polished product and generous free tier.

i love Vercel for hosting projects and their developer experience, but you need to know when to leverage other tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment