Overview
ThingsBoard Edge allows different types of automation events—Scheduler and Rule Chain events.
The Scheduler event is periodic task performed automatically, such as telemetry and attribute update or RPC commands, etc. For more details on this feature, see the ThingBoard Platform Scheduler documentation and the Edge Scheduler documentation.
A Rule Chain allows you to perform automated tasks based on incoming data or events. These tasks are performed by rule nodes, which are the building blocks of the Rule Chain. For example, when a device sends temperature data that reaches the threshold, the Rule Chain processes it and creates an alarm notification. Read more about Rule Engine and Rule Chain Templates in the corresponding documentation.
Edge-Specific Considerations
- Rule Chain templates and Scheduler events cannot be created or modified directly on ThingsBoard Edge. They must be set up in ThingsBoard Cloud and synced to Edge.
- Once Rule Chain templates and Scheduler events are synchronized to Edge instance, they run entirely at the edge, independent of internet connection.
- Both Scheduler events and Rule Chain templates execute locally on the Edge.
The Comparison Matrix
When to Use Each One?
- Scheduler:
- Time-based triggers are required;
- A periodic or scheduled automation that is independent of device data.
- Rule Chains:
- Real-time reaction to events or telemetry;
- Complex logic, or external API calls are required;
- Local incoming data, attribute updates, alarms, etc., processing.
Using Both Features
To create enhanced automation logic on your Edge, use both Scheduler events and Rule Chain templates.
Use Case
To turn off devices (e.g., pumps) every night at 7 PM and alert if they’re still running 10 minutes later, configure two Scheduler events and modify the Rule Chain template.
- The first scheduler event will send command { “action”: “stop_pump” } to stop the pump every night at 7 PM. Select Send RPC Request to Device as the Event type.
- The second scheduler event will send command { "action": "check_pump_status" } to check the pump status every night at 7:10 PM. Enter "Custom" as the Event type and "Other" as the Message type.
- In the Rule Chain template:
- The first scheduler event (turn off pump) enters the rule chain as RPC Request to Device. It comes into Message Type Switch, routed via the "RPC Request to Device" link to the "rpc call request" node.
- The second scheduler event (check pump status) enters the rule chain as a custom message. The "check pump status" script confirms that the message is the second scheduler event. Then, the "originator telemetry" node fetches pumpStatus. The "check pump status script" checks if it's still "ON". If it is, the rule chain template triggers the alarm.



- The first scheduler event (turn off pump) enters the rule chain as RPC Request to Device. It comes into Message Type Switch, routed via the "RPC Request to Device" link to the "rpc call request" node.
- The second scheduler event (check pump status) enters the rule chain as a custom message. The "check pump status" script confirms that the message is the second scheduler event. Then, the "originator telemetry" node fetches pumpStatus. The "check pump status script" checks if it's still "ON". If it is, the rule chain template triggers the alarm.
Next steps
-
Getting started guide - Provide quick overview of main ThingsBoard Edge features. Designed to be completed in 15-30 minutes:
-
Installation guides - Learn how to setup ThingsBoard Edge on various available operating systems and connect to ThingsBoard Server.
-
Edge Rule Engine:
-
Rule Chain Templates - Learn how to use ThingsBoard Edge Rule Chain Templates.
-
Provision Rule Chains from cloud to edge - Learn how to provision edge rule chains from cloud to edge.
-
- Security:
- gRPC over SSL/TLS - Learn how to configure gRPC over SSL/TLS for communication between edge and cloud.
-
Features:
-
Edge Status - Learn about Edge Status page on ThingsBoard Edge.
-
Cloud Events - Learn about Cloud Events page on ThingsBoard Edge.
-
-
Use cases:
-
Manage alarms and RPC requests on edge devices - This guide will show how to generate local alarms on the edge and send RPC requests to devices connected to edge:
-
Data filtering and traffic reduce - This guide will show how to send to cloud from edge only filterd amount of device data:
-
- Roadmap - ThingsBoard Edge roadmap.