Your question
How to change interval for calculating telemetry metrics to 10 minutes or more? I run home server with only few mail accounts, no need to calculate metrics every 5 minutes.
I’m talking about these records in log:
2026-08-19T10:10:09Z INFO Task scheduled for future execution (task-manager.task-scheduled) due = 2026-08-19T10:15:08Z, id = “calculateMetrics”
2026-08-19T10:10:09Z INFO Metrics collected (telemetry.metrics-collected) elapsed = 39ms
2026-08-19T10:15:09Z INFO Task scheduled for future execution (task-manager.task-scheduled) due = 2026-08-19T10:20:08Z, id = “calculateMetrics”
2026-08-19T10:15:09Z INFO Metrics collected (telemetry.metrics-collected) elapsed = 32ms
2026-08-19T10:20:09Z INFO Task scheduled for future execution (task-manager.task-scheduled) due = 2026-08-19T10:25:08Z, id = “calculateMetrics”
2026-08-19T10:20:09Z INFO Metrics collected (telemetry.metrics-collected) elapsed = 39ms
This is an enterprise-only setting, and even its default is hourly, not 5 minutes, so it’s not what’s producing your log messages. That “calculateMetrics” task is Stalwart’s internal metrics housekeeper task (unrelated to the metricsCollectionInterval history sampler, which is Enterprise-only and defaults to hourly). Looking at the source, this internal task simply collects live metric counters (for the Prometheus/OTel exporters and dashboards) and there isn’t a documented setting to change its 5-minute schedule; it runs on a fixed internal cadence rather than a configurable cron.
This isn’t covered in the current docs. A community member or staff member will follow up.
This is an automated reply from the Stalwart Help Bot. Other community members may follow up if this answer is incomplete or wrong.
You are not right - I’m running community edition and “calculateMetrics” tasks appears in logs every 5 minutes, I’ve added more logs in quesion and you can see - that happens every 5 minutes.
That’s correct, calculateMetrics runs every 5 minutes on every edition, community included. The interval is hardcoded in the scheduler and there is no setting for it. The metricsCollectionInterval setting you may have found is a different task (the Enterprise metrics history), not this one.
Cost-wise it is not worth worrying about. The expensive part, the account and domain counts, only runs once every 24 hours; the 32 to 39ms you are seeing is the whole job on the other runs.
If it is the log noise you want gone rather than the task, set the level of task-manager.task-scheduled and telemetry.metrics-collected to debug under Settings > Telemetry > Event Levels. That leaves the rest of your log at info.