eric
eric13mo ago

Not able to get cron jobs working (won't show up in dashboard)

Not sure if I'm doing something wrong but the Cron dashboard isn't showing any of my cron jobs. I set up a fairly simple convex/cron.ts file following this format:
import { cronJobs } from "convex/server";
import { internal } from "./_generated/api";

const crons = cronJobs();

crons.hourly(
"fill missing book genres @ 0",
{ minuteUTC: 0 },
internal.myFunctions.fillMissingBookGenres
);

export default crons;
import { cronJobs } from "convex/server";
import { internal } from "./_generated/api";

const crons = cronJobs();

crons.hourly(
"fill missing book genres @ 0",
{ minuteUTC: 0 },
internal.myFunctions.fillMissingBookGenres
);

export default crons;
However, my dashboard still has this (aka no cron jobs). Would love help!
No description
4 Replies
jamwt
jamwt13mo ago
@eric sorry to hear this. do you see the rest of your functions all listed there, like fillMissingBookGenres ? (in the dashboard) and what's the output of npx convex dev ... no error messages when you modify this cron.ts file and it tries to resync? @eric oh! I might have the answer this file needs to be called crons.ts, plural. not cron.ts
jamwt
jamwt13mo ago
Cron Jobs | Convex Developer Hub
Convex allows you to schedule functions to run on a recurring basis. For
eric
ericOP13mo ago
oh wow thank you for the speedy response! that worked, my bad for the oversight
jamwt
jamwt13mo ago
no problem at all glad it was a simple fix

Did you find this page helpful?