www/apps/resources/app/troubleshooting/scheduled-job-not-running/page.mdx
import NotRunning from "../_sections/scheduled-jobs/not-running.mdx" import NotRunningWorkerMode from "../_sections/scheduled-jobs/not-running-worker-mode.mdx"
export const metadata = {
title: Scheduled Job Not Running on Schedule,
}
This troubleshooting guide helps you troubleshoot issues when a scheduled job in your Medusa application is not running, or running at unexpected times.
Make sure that the scheduled job is set up correctly in your Medusa application. Check the following:
src/jobs directory.import { MedusaContainer } from "@medusajs/framework/types"
export default async function greetingJob(container: MedusaContainer) {
const logger = container.resolve("logger")
logger.info("Greeting!")
}
config object that has the following properties:
name: A unique name for the job.schedule: A string that holds a cron expression or an interval indicating the schedule to run the job.For example:
export const config = {
name: "greeting-every-minute",
schedule: "* * * * *",
}