[Solved] How to use Vercel Cron Job with T3?
Hey! I am using T3. I am new with TRPC and don't know how to handle Vercel Cron Job. I want to add some data to the database everyday. How do I do that?
6 Replies
Vercel Documentation
Cron Jobs
Learn how to schedule your Serverless and Edge Functions with Cron Jobs.
vercel.json
Should be once a day
I would probably make my own normal api handle with Next like this
Then in dailydb I would just use a caller from trpc to call the trpc procedure
https://trpc.io/docs/server/server-side-callsif you are using hobby version of vercel, it will be only triggered in prod env.
i use serverlessQ
@barry got it thank you
It does Cron jobs too?
yes, Vercel has many plugins; serverlessQ is one of them
Gotcha thx