Run JavaScript code on a 5-minute schedule

Recipe ToolsMarketingDeveloper Tool

What it does

When the clock triggers every 5 minutes, this automation runs JavaScript code to process data or perform calculations. Someone can rely on the code executing at regular intervals without manual intervention.

Who it's for

Engineering teams who need to run scheduled JavaScript logic without manual intervention.

How teams use this

Poll an API on a schedule

Run JavaScript every 5 minutes to call an external API, parse the response, and store results. The automation handles the timing so someone does not need to check manually.

Aggregate data at regular intervals

Execute JavaScript code to compute KPIs or combine data every 5 minutes and send results to a dashboard. The schedule keeps metrics fresh without someone checking manually.

Add conditional logic to the code

Include if-then statements in the JavaScript so this automation only runs specific operations when certain conditions are met. The 5-minute schedule stays the same and only the code logic changes.

How it works

  1. Trigger every 5 minutes. The Clock starts this automation on a 5-minute interval so the JavaScript code runs at regular, predictable times.
  2. Run the JavaScript code. Js Eval executes the decoded JavaScript code to process data, transform values, or perform calculations as needed for this automation.