FAQ
Developer hub
How to create Triggers
Scheduled Triggers

Scheduled Triggers

This trigger type periodically checks the provided API endpoint for new or updated data.

The update time or frequency of polling occurs per active workflows every 5 to 15 minutes, depending on the user’s viaSocket pricing plans.

Scheduled Trigger Demo
Scheduled Trigger Demo

Click through a step-by-step, interactive demo walkthrough of Viasocket, powered by Supademo.

https://app.supademo.com/embed/cm66g55s9055e1xdhbwfas6oa?embed_v=2

Using __executionStartTime__ for Filtering Data

You can use the __executionStartTime__ variable in scheduled triggers to filter records by their creation time. This variable represents the exact time when the trigger runs, eliminating the need to manually get the current time.

For example, to calculate the time from X minutes ago, you can subtract the specified number of minutes (given by context?.inputData?.scheduledTime) from the __executionStartTime__

const minutesAgo = new Date(__executionStartTime__ - context?.inputData?.scheduledTime * 60 * 1000);  

This will give you the timestamp of exactly X minutes before the trigger was executed.