Schedule a recurring task
Build a cron-triggered pattern that runs on a schedule.
Some automations do not wait for an external event — they run on a timer. Health checks, data syncs, cleanup jobs, and periodic reports all follow this pattern. DRAGOPS supports cron-based scheduling through the On Schedule trigger, which fires your pattern at regular intervals.
What you will build
A pattern that runs every five minutes, fetches a URL, and logs whether the service is healthy:
- On Schedule — fires on a cron schedule
- HTTP Request — sends a GET request to a health endpoint
- Branch — checks the response status code
- Log — records the result
Before you begin
Make sure you have:
- An active DRAGOPS account
- A URL you want to monitor (this guide uses
https://api.example.com/healthas a placeholder)
Step 1: Create the pattern
- Open the DRAGOPS dashboard.
- Select New Pattern.
- Enter a name such as "Health Check" and select Create.
The editor opens with an On Start node on the canvas. Remove it — this pattern uses a schedule trigger instead.
Step 2: Add the On Schedule trigger
- Select the On Start node and press Delete or Backspace.
- Right-click on the canvas to open the node search menu.
- Search for "On Schedule" and add it to the canvas.
The On Schedule node has one input: a Cron Expression that defines when the pattern fires.
Step 3: Configure the cron expression
Select the On Schedule node to open the Inspector Panel on the left side. Set the Cron Expression field to the schedule you need.
Common cron patterns
| Expression | Schedule |
|---|---|
*/5 * * * * | Every 5 minutes |
0 * * * * | Every hour, on the hour |
0 9 * * * | Daily at 9:00 AM UTC |
0 9 * * MON-FRI | Weekdays at 9:00 AM UTC |
0 0 * * SUN | Every Sunday at midnight UTC |
0 */6 * * * | Every 6 hours |
A cron expression has five fields: minute, hour, day of month, month, and day of week. Use * for "every", */N for "every N", and comma-separated values for specific times.
For this guide, set the cron expression to */5 * * * * (every 5 minutes).
Step 4: Add the HTTP Request node
- Right-click on the canvas and search for "HTTP Request". Add it to the canvas, to the right of On Schedule.
- Select the HTTP Request node and configure it:
- Method:
GET - URL:
https://api.example.com/health
- Method:
Wire the execution flow: drag from the execution output pin on On Schedule to the execution input pin on HTTP Request.
Step 5: Check the response status
Add a Branch node to check whether the request succeeded.
- Right-click on the canvas and search for "Branch". Add it to the canvas, to the right of HTTP Request.
- Right-click on the canvas again and search for "Equal". Add the Equal node near Branch.
Wire the data:
- Drag from HTTP Request's Status Code output pin to the first input pin on Equal.
- Set Equal's second input to
200. - Drag from Equal's Result output pin to Branch's Condition input pin.
Wire the execution: drag from HTTP Request's execution output pin to Branch's execution input pin.
Step 6: Log the result
Add two Log nodes — one for success and one for failure.
- Right-click on the canvas and search for "Log". Add a Log node. Set its Message to
Health check passed — service is healthy. - Add a second Log node. Set its Message to
Health check failed — service returned an unexpected status.
Wire the execution:
- Drag from Branch's True output pin to the first Log node.
- Drag from Branch's False output pin to the second Log node.
Step 7: Test the pattern
- Select Run in the toolbar.
- The On Schedule trigger does not require event data, so select Run immediately.
- Check the console to verify that the HTTP Request node runs, the Branch evaluates, and the correct Log message appears.
If the target URL is unreachable during testing, wrap the HTTP Request node in a Try / Catch to handle the error gracefully. See Handle errors for details.
Step 8: Deploy
- Select Deploy in the toolbar.
- DRAGOPS activates the schedule. The pattern now runs automatically at the interval defined by your cron expression.
Catch-up behavior
If the execution engine restarts (for example, during a platform update), DRAGOPS does not retroactively fire missed schedule ticks. The schedule resumes from the next matching time after the engine is back online. If your automation requires guaranteed delivery, consider adding a timestamp check at the start of the pattern to detect and handle gaps.
Verify the result
- Go to the Deployments page.
- Select the "Health Check" deployment.
- Wait for the next scheduled execution to appear in the execution history.
- Select the execution and verify the log output matches what you saw during testing.
Each execution appears in the history with a timestamp, status, and the full node-by-node log.
What is next?
Handle errors
Add retry logic and fallback behavior for resilient scheduled tasks.
Make HTTP requests
Configure headers, authentication, and response handling for API calls.
Use variables
Store and track state across nodes within a pattern execution.
Triggers
Learn about all trigger types: webhooks, schedules, and pattern calls.