Periodic Action

Using this action, you can trigger actions repeatedly after a specific time interval. Some examples are retrying the API call every two minutes when it fails and showing a popup to remind a user about something.

Types of Periodic Action

Following are the types of Periodic Actions you can trigger:

  1. Start Periodic Action: This triggers periodic actions. Any actions added after/under this will be executed repeatedly.

  2. Stop Periodic Action: This stops the repeating actions triggered by the Start Periodic Action. This is helpful, especially when you want to stop repeating actions when some conditions are met.

Starting Periodic Action

Follow the steps below to add repeating actions:

  1. Select the Widget (e.g., Container, Button, etc.) on which you want to add the action.

  2. Select Actions from the Properties panel (the right menu), and click Open. This will open an Action Flow Editor in a new popup window.

  3. Search and select the Start Periodic Actions (under Utilities) action.

  4. Enter the Time Interval value in milliseconds (e.g., 1000ms = 1 second). This will be the wait time the actions will take to before repeating. For example, if you have a Snackbar action under the periodic action with a Time Interval of 3000ms, the Snackbar action will trigger every 3 seconds.

  5. By default, the periodic actions will trigger immediately. To wait before the periodic actions trigger the first time, disable the Start Action Immediately. Note: The wait time will be the Time Interval specified in the previous step.

  6. You can also set a friendly Periodic Timer Name.

  7. Click on the "+" button below the Start Periodic Action tile and add your actions. Any actions added from here will repeat as per the specified time interval.

Always remember to stop the periodic actions, like timers or data fetch operations, when navigating away from a page. Failing to do so can lead to performance issues, unnecessary resource consumption, and unexpected app behavior.

Stopping Periodic Action

Follow the steps below to stop the periodic action:

  1. Select the widget (e.g., Button, Page, etc.) on which you want to add the action.

  2. Select Actions from the Properties panel (the right menu), and click Open. This will open an Action flow Editor in a new popup window. If it's the first action, click + Add Action button. Otherwise, click the "+" button below the previous action tile and select Add Action.

  3. Search and select the Stop Periodic Actions (under Utilities) action.

  4. Select Choose Timer to Cancel to the Periodic Timer Name you gave while adding the Start Periodic Action.


Last Updated Date: January 13, 2024

Last updated