> ## Documentation Index
> Fetch the complete documentation index at: https://gadget.aurelienbbn.com/llms.txt
> Use this file to discover all available pages before exploring further.

# model-action-no-invalid-trigger

> Disallow scheduler triggers in model action options.

| Recommended                                  | Strict                                     | Auto-fixable                                | Scope              |
| -------------------------------------------- | ------------------------------------------ | ------------------------------------------- | ------------------ |
| <Badge color="orange" size="sm">warn</Badge> | <Badge color="red" size="sm">error</Badge> | <Badge color="green" size="sm">true</Badge> | Model action files |

<Tip>Related Gadget documentation: [Gadget docs](https://docs.gadget.dev/guides/actions#scheduler-trigger)</Tip>

**What the linter reports:**

> Model actions cannot use scheduler triggers.

## Examples

<Tabs>
  <Tab title="Incorrect">
    ```ts title="api/models/widget/actions/create.ts" theme={null}
    export const options: ActionOptions = {
      // scheduler triggers are only valid in global actions
      triggers: [{ type: "scheduler" }],
    };
    ```
  </Tab>

  <Tab title="Correct">
    ```ts title="api/models/widget/actions/create.ts" theme={null}
    export const options: ActionOptions = {
      // model actions support api, shopify, and other non-scheduler triggers
      triggers: [{ type: "api" }],
    };
    ```
  </Tab>
</Tabs>
