Cron Jobs Not Executing on Vercel Pro Plan Despite Configuration and Troubleshooting

I have configured two cron jobs in my Vercel project using the Pro plan. Despite setting them to run every minute and reviewing existing GitHub discussions, the jobs are not executing as expected. I need assistance in troubleshooting and resolving this issue.

Current Configuration

{
  "crons": [
    {
      "path": "/api/cron/schedule-jobs",
      "schedule": "* * * * *"
    },
    {
      "path": "/api/cron/process-jobs",
      "schedule": "* * * * *"
    }
  ]
}

Next.js Version: 14.2.5

The cron jobs are not executing at all

Steps to Reproduce

  1. Created a Next.js project and deployed it to Vercel.
  2. Added the above cron configuration to the project’s vercel.json file.
  3. Implemented the corresponding API routes:
    /api/cron/schedule-jobs
    /api/cron/process-jobs
  4. Deployed the project to Vercel using the Pro plan.
  5. Waited for the cron jobs to execute (expected every minute and switched to higher ones like every 30mins).
  6. Checked Vercel logs and monitored the application, but no cron job executions were observed.

Hey @deltacs99. Thanks for including the configuration and list of things you tried.

If you were on a Hobby plan I would recommend changing the schedule to stay within the once-per-day Hobby limit, but that shouldn’t be a problem in your case.

I know this might seem silly and you’ve probably already tried it, but what happens if you try to hit your /api/cron/schedule-jobs or /api/cron/process-jobs function directly (e.g. from the browser or Postman)?

I also want to make sure that you’re checking a Production deployment since cron jobs don’t run on Previews.

Hi @amyegan when i do it on the browser it works and it is in production deployments that i am checking these

Hallo @amyegan can you still help

I don’t have an answer yet, but I shared your report with the Cron Jobs team. We’ll keep you updated here as new info becomes available.

Sure thing thanks @amyegan

@amyegan also noticed that during the build process the cron jobs are running but dont run after that as they should

Hi @deltacs99,

I’m an engineer working on Cron Jobs.

I did check our logs and could find invocations from our cron jobs service to both of your paths.
The logs indicate that a cached response was served, so my suspicion is that it’s not a dynamic route.
Would you be able to share more details about the implementation of your API routes?

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.

In case anyone stumbles onto this post, we have a recently published guide on troubleshooting cron jobs: