scheduled-job-name-unique - ESLint plugin rules
This rule requires a scheduled job's config.name to be unique across all scheduled jobs in the project.
Severity#
error. This rule is enabled in the strict preset.
By default, Medusa projects use the recommended preset, which doesn't enable this rule. To use it, switch to the strict preset.
What it Targets#
This rule targets files in your project's src/jobs directory. It reports a config.name that's already used by another scheduled job file.
The following code is reported by the rule when another job already uses the name sync-products:
Instead, give the job a unique name:
Why it's Important
Medusa identifies each scheduled job by its name. Two jobs sharing a name conflict with each other, so only one is registered.
Learn more in the Scheduled Jobs documentation.
Fixable#
This rule isn't auto-fixable.