quirrel: CronJob in vercel does not work

None of the CronJobs are calling our endpoints when I deploy them on vercel and have vercel ci inside of my vercel-build script, and I can confirm it’s actually building in the build log.

image

In the quirrel dashboard, the API Calls are going up, so it looks like it’s actually doing something:

image

However, in vercel, I’m not seeing any logs in my log drain of the endpoint being called whatsoever. When I go to it in the browser (which obviously won’t work) it DOES generate a log of visiting the endpoint, so I know if quirrel was actually reaching it then I would see something.

// src/pages/api/v1/crons/orders/cleanup/index.ts
import { CronJob } from 'quirrel/next';

const cron = CronJob('api/v1/crons/orders/cleanup', '0 * * * *', async (...args: any[]) => {
	...
});

export default cron;

It’s not the file pathing. I have a Queue also running using the same file structure and path so, as long as it’s consistent between them, then it should be fine.

How do I make this work?

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 23 (9 by maintainers)

Most upvoted comments

I’ll get around to creating a simplified copy for you to debug tonight, as I’m not using GitHub for it atm. Thanks for the prompt response