scheduled-job-config-required - ESLint plugin rules
This rule requires scheduled job files to export a config object with name and schedule properties.
Severity#
error. This rule is enabled in the recommended preset.
What it Targets#
This rule targets files in your project's src/jobs directory. It reports a scheduled job file that's missing the named config export, or whose config object doesn't declare both a name and a schedule property.
The following code is reported by the rule:
Instead, export a config object with name and schedule:
Why it's Important#
The uniquely identifies the job, and the tells Medusa when to run it. Without both, Medusa can't register the job.
Learn more in the Scheduled Jobs documentation.
Fixable#
This rule isn't auto-fixable.
Was this page helpful?