Hey Indie Hackers,
I'm curious how everyone is running corn jobs when you're deploying NextJS apps on either Vercel or Netlify.
There are very popular ways of handling this:
Have y'all seen any great ways to do something similar in the NextJS / Node ecosystem?
I'm considering SaaS and run-it-yourself open source solutions.
Thanks.
We've added a new section to the docs with cron job recommendations!
https://vercel.com/docs/solutions/cron-jobs
Love it.
Lately i have been using Github Workflows to do scheduled things. I use it to trigger a daily webhook for doing nightly builds in Netlify, works like a charm and very easy to set up
I like this a lot! Thanks for the idea.
Following up here,
I built Slater, a cron job service built explicitly for Next.js & Vercel. It's entirely free right now while I'm in early access. Just sign up for the waitlist on the homepage and I'll email you some info to get started.
It's essentially cron jobs as code that I automate the endpoints with.
You write code like this:
// pages/api/slater/[...slater].jsand when you deploy to prod on Vercel, Slater will hit the endpoint according to the cron schedule you set (UTC time).
Check it out here: https://tryslater.com
If you have a node.js backend you can use node-schedule. The jobs don't persists so you need to store them in a database if that's needed.