question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CronJob duplicates on Vercel

See original GitHub issue

Bug Report

Current Behavior Currently I have one CronJob which works fine, but when i redeploy my “production” environment in Vercel, using documentation provided method I see duplicated CronJob in my ui.quirrel.dev webpage. Is this behaviour expected, or “old” CronJob instances should be cleaned up after new deployment?

Input Code Just regular CronJob

import { CronJob } from "quirrel/next";

export default CronJob(
  "api/customCron",
  async () => {
    // await ...
  }
)

Expected behavior/code I expect that old CronJob instances should be deleted and only one is visible in ui.quirrel.dev webpage.

Environment

  • Quirrel version: 1.9.2
  • Node/npm version: node 16/pnpm 7.9.5
  • Nextjs 12.2
  • Vercel

Additional context/Screenshots package.json

{
  "scripts": {
    "build:vercel": "next build && quirrel ci"
  }
}

CleanShot 2022-09-01 at 22 24 49

Thank you in advance!

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
markkkkascommented, Nov 30, 2022

@Skn0tt looks like that we managed to fix it! Thank you very much for support.

0reactions
markkkkascommented, Nov 30, 2022

@Skn0tt Sorry for confusing you, it’s not Netlify, its fly.io. I followed this approach https://dev.to/remixtape/self-hosting-quirrel-5af7

Regarding the QUIRREL_BASE_URL looks like im missing it! Ill try to add it and then will try to redeploy.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Setup Cron Jobs on Vercel
Learn how to setup and use cron jobs on Vercel. ... Cron Jobs allow you to schedule tasks at specific intervals. Since the...
Read more >
RFC: Improved Cron Jobs · Issue #31 · quirrel-dev ... - GitHub
Quirrel already supports something it calls "cron jobs": ... makes sure job isn't duplicated override: true, // if another job with that ID ......
Read more >
Vercel NodeJS server goes to sleep with schedule job ...
I'm running a schedule job on button click from my frontend App sent to Nextjs (NodeJS) backend /api/ function which doesn't get triggered...
Read more >
Vercel Deploy | Drupal.org
Issues for Vercel Deploy. To avoid duplicates, please search before submitting a new issue. Search. Advanced search ...
Read more >
Going serverless. vercel + next — things i learned on the…
If you're hoping for a Vercel/Next.js bash that's the wrong post for it. ... Still I always ended up needing cron jobs for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found