aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/schedule/ScheduleManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-01-25 14:25:40 -0800
committerAnton Tananaev <anton@traccar.org>2023-01-25 14:25:40 -0800
commitc828e6af3ca96e51c20f5e189ab1293c4fe29c8a (patch)
treec0faf8ce03cc2fee252f8f07fea7bddaebd0a2a4 /src/main/java/org/traccar/schedule/ScheduleManager.java
parente5a52e47b5fcae268ee89748ffe9bc05ab726c31 (diff)
downloadtrackermap-server-c828e6af3ca96e51c20f5e189ab1293c4fe29c8a.tar.gz
trackermap-server-c828e6af3ca96e51c20f5e189ab1293c4fe29c8a.tar.bz2
trackermap-server-c828e6af3ca96e51c20f5e189ab1293c4fe29c8a.zip
Add scheduled reports task
Diffstat (limited to 'src/main/java/org/traccar/schedule/ScheduleManager.java')
-rw-r--r--src/main/java/org/traccar/schedule/ScheduleManager.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/schedule/ScheduleManager.java b/src/main/java/org/traccar/schedule/ScheduleManager.java
index 6412a186a..e1de3b3af 100644
--- a/src/main/java/org/traccar/schedule/ScheduleManager.java
+++ b/src/main/java/org/traccar/schedule/ScheduleManager.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020 - 2022 Anton Tananaev (anton@traccar.org)
+ * Copyright 2020 - 2023 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -38,8 +38,12 @@ public class ScheduleManager implements LifecycleObject {
@Override
public void start() {
executor = Executors.newSingleThreadScheduledExecutor();
- List.of(TaskDeviceInactivityCheck.class, TaskWebSocketKeepalive.class, TaskHealthCheck.class)
- .forEach(task -> injector.getInstance(task).schedule(executor));
+ var tasks = List.of(
+ TaskReports.class,
+ TaskDeviceInactivityCheck.class,
+ TaskWebSocketKeepalive.class,
+ TaskHealthCheck.class);
+ tasks.forEach(task -> injector.getInstance(task).schedule(executor));
}
@Override