deleteByDate example


        return [
            'Shopware_Cronjob_MailLogCleanup' => 'mailLogCleanup',
        ];
    }

    public function mailLogCleanup(): void
    {
        $now = new DateTime('now');
        $maximumAgeInterval = new DateInterval(sprintf('P%dD', $this->maximumAgeInDays));

        $this->logRepository->deleteByDate(null, $now->sub($maximumAgeInterval));
    }
}
Home | Imprint | This part of the site doesn't use cookies.