Skip to content

Cookie preferences

We use cookies for our own analytics, to see how our campaigns perform and, if you allow it, to load content from other services such as the Google site search. We never sell your data. Necessary cookies keep the site working and cannot be switched off. See our Cookie Policy for details and our Privacy Policy for how we handle personal data.

Security, load balancing and remembering your cookie choice.

Show us which pages people read and how they find the site, so we can improve it (Google Analytics).

Show us which of our ad campaigns bring visitors to the site and remember the campaign or partner link you arrived from (Google Ads, partner program). We do not use these cookies to build advertising profiles.

Load the site search from Google when you use it. Google sets its own cookies and shows ads in the search results.

© 2026 The ThingsBoard Authors
Try for free

ThingsBoard Cloud

Choose your data region

Your data stays in the region you choose, for residency and compliance. No credit card required.

Rather run it yourself? Install on your own servers

Task Service

The Task Service manages and runs background jobs for data processing — scheduling, executing, and monitoring them so that model training, telemetry saves, anomaly detection, and report generation happen efficiently without blocking the UI.

Navigate to Tasks in the main menu to view and control all jobs.

Jobs are grouped by domain. Most jobs are triggered by a user action; a few also support a recurring schedule configured in the relevant feature settings.

Job Runs Description
Execute task sequence On demand Executes a predefined ordered sequence of tasks, useful for chaining multi-step operations
Import configuration On demand Imports views, models, and other Trendz configuration objects from an exported file
Topology discovery On demand Full scan of ThingsBoard — builds the complete list of entity types, telemetry fields, and relations available for analysis
Lite topology discovery Scheduled Incremental scan triggered automatically when new device or asset types appear in ThingsBoard; uses a cooldown to avoid redundant runs
Refresh cache On demand or scheduled Clears and rebuilds the data cache for a view; runs on a configurable periodic or calendar-based schedule when auto-refresh is enabled in view settings
Job Runs Description
Build view report On demand Loads and processes raw telemetry for a view so the chart or table can be rendered
Load view filter On demand Fetches the set of available values for a view’s filter fields (e.g., entity names or attribute values)
Save telemetry to TB On demand or scheduled Computes aggregated telemetry from a view and writes the results back to ThingsBoard as device attributes or time-series; runs on a configurable schedule when enabled in view settings
Build alarm report On demand Evaluates alarm conditions defined in a view and generates the corresponding alarm report
Job Runs Description
Build anomaly model On demand Trains the anomaly detection model on historical telemetry data for the selected entities
Find anomalies On demand Re-runs anomaly scoring over a specified historical time range and entity set without retraining the model
Anomaly autodiscovery Scheduled Runs on a configurable periodic schedule to scan incoming data for new anomalies; disabled by default, enabled in anomaly model settings
Job Runs Description
Test calculation On demand Evaluates a calculation field definition against sample data to verify the formula before saving
Save calculation result to TB On demand or scheduled Computes the calculation field values for a time range and writes the results to ThingsBoard; runs on a configurable schedule when auto-refresh is enabled in calculation field settings
Job Runs Description
Train prediction model On demand Fits a forecasting model on the selected entities’ historical telemetry
Save prediction model result to TB Scheduled Extends the forecast using incremental training, then saves the predicted values to ThingsBoard; runs on a configurable schedule configured in prediction model settings
Prediction model accuracy On demand Compares the model’s predictions against actual telemetry to report accuracy metrics
Job Runs Description
AI Assistant response On demand Sends the current view data to the AI model and returns a natural-language explanation or answer
Run custom prompt On demand Executes a user-defined AI prompt against the view context
Generate view summary On demand Produces an AI-generated summary of the key insights in a view
Find metric On demand Uses AI to propose metric definitions based on available telemetry fields in the Metric Explorer
Generate metric calculation On demand Uses AI to write the Python implementation for a metric definition

Click any task in the list to view its execution details:

Field Description
Time Started When the task execution began
Duration How long the task has been running
Time Finished When the task completed or is expected to finish
Status Current state — see Task Statuses below

From the task detail panel you can also:

  • Execute Task — trigger the task to run immediately.
  • Stop Task — stop a running task.
  • Go to entity — navigate to the ThingsBoard entity associated with the task.
┌──────────┐
│ CREATED │ ← scheduled, waiting to run
└────┬─────┘
│ picked up by scheduler
▼
┌──────────┐
│ RUNNING │ ← executing on a thread
└────┬─────┘
┌─────────────┼──────────────┐
▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌──────────┐
│ FINISHED │ │ FAILED │ │ CANCELED │
└──────────┘ └──────────┘ └──────────┘
LOST ← execution interrupted by a server restart
(detected and marked automatically on next startup)
Status Meaning
Created Scheduled but not yet started
Running Currently executing
Finished Completed successfully
Failed Terminated with an error
Canceled Stopped manually before completion
Lost Execution was interrupted unexpectedly (e.g., server restart)
None No status available
  • Stop All Tasks — immediately stops all currently running task executions. The tasks themselves and their configurations are not affected.
  • Clear All Executions — removes the execution history for all tasks. Execution records are retained for 3 days. This action only clears history and does not affect future task execution.

The Executions tab provides a detailed log of all task executions. Filter by status — All, Created, Running, or Failed — to quickly find relevant entries.

For each execution the tab shows: Time Started, Duration, Time Finished, and Status.

Variable Default Description
TASK_SERVICE_ENABLE true Enable or disable the entire task service
TASK_SERVICE_BACKGROUND_ENABLE true Enable or disable automatic background job scheduling
TASK_SERVICE_TASK_QUERY_SIZE 10 Max jobs picked up per scheduling cycle
TASK_SERVICE_DEFAULT_TASK_TIMEOUT 86400000 (24 h) Timeout in milliseconds; jobs running longer are canceled
TASK_SERVICE_TTL_TRACKING_ENABLE true Automatically remove execution records older than 3 days
TASK_SERVICE_LOST_TRACKING_ENABLE true Detect and mark executions interrupted by a restart
TASK_SERVICE_STATE_RECORD_TIMEOUT 5000 (5 s) Interval in milliseconds for writing execution state to the database