Scheduled Triggers¶
Overview¶
Scheduled Triggers allow you to execute server-side logic on a regular schedule that you define. You can use scheduled Triggers to do work that happens on a periodic basis, such as updating a document every minute, generating a nightly report, or sending an automated weekly email newsletter.
Create a Scheduled Trigger¶
To create a scheduled Trigger in the Realm UI:
- Click Triggers under MongoDB Cluster in the left navigation menu.
- Select Scheduled Triggers from the Trigger type dropdown menu.
- Click Add a Trigger to open the Trigger configuration page.
Enter configuration values for the Trigger. You can configure two types of Trigger schedules: Basic or Advanced.
- A Basic schedule executes the Trigger periodically based on a single unit of time and an interval, such as "every five minutes" or "every Monday".
- An Advanced schedule executes the Trigger based on a custom CRON expression that you define.
- Click Save.

Reference¶
Scheduled Trigger Configuration¶
Scheduled Triggers have the following configuration parameters:
Field | Description |
---|---|
Trigger Type type: <string> | Required. The type of the Trigger. For scheduled Triggers, this value should be set to |
Trigger Name name: <string> | Required. The name of the Trigger. |
Linked Function function_name: <string> | Required. The name of the Realm Function that the Trigger executes whenever it fires. Note A scheduled Trigger does not pass any arguments to its linked Function. |
Schedule config.schedule: <string> | Required. The CRON expression
that MongoDB Realm uses to determine when to fire the Trigger. |