diff --git a/mailpoet/lib/Config/Populator.php b/mailpoet/lib/Config/Populator.php index 4c2c8d29b2..4bfa2ce198 100644 --- a/mailpoet/lib/Config/Populator.php +++ b/mailpoet/lib/Config/Populator.php @@ -714,6 +714,14 @@ class Populator { } private function scheduleBackfillEngagementData(): void { + $existingTask = $this->scheduledTasksRepository->findOneBy( + [ + 'type' => BackfillEngagementData::TASK_TYPE, + ] + ); + if ($existingTask) { + return; + } $this->scheduleTask( BackfillEngagementData::TASK_TYPE, Carbon::createFromTimestamp($this->wp->currentTime('timestamp'))