Skip to main content
This rule disallows scheduler triggers in model action options. Model actions do not support scheduler triggers - scheduler functionality should be moved to a global action instead.

Rule Details

This rule checks the triggers array in model action options and reports an error if any trigger has type: "scheduler". Model actions can only be triggered by API calls or model lifecycle events. Severity: Error Auto-fixable: Yes

Examples

Incorrect

Correct

Auto-fixes

The rule automatically removes scheduler triggers:
If you need scheduler functionality, move the action to api/actions/ as a global action where scheduler triggers are supported.

When to Use

This rule is included in the recommended config and should always be enabled for Gadget projects. It prevents configuration errors by catching invalid triggers at development time.