Automations
1 year ago
KeyCheck
1 year ago
SendingQueue
4 days ago
StatsNotifications
2 months ago
AuthorizedSendingEmailsCheck.php
3 years ago
BackfillEngagementData.php
1 year ago
Bounce.php
4 days ago
BounceTaskSubscribersCleanup.php
1 month ago
BulkConfirmationEmailResend.php
2 months ago
ExportFilesCleanup.php
2 months ago
InactiveSubscribersMaintenance.php
2 weeks ago
LogCleanup.php
10 months ago
Mixpanel.php
9 months ago
NewsletterTemplateThumbnails.php
1 year ago
ReEngagementEmailsScheduler.php
1 year ago
Scheduler.php
2 months ago
SendingQueueBodyCleanup.php
2 months ago
SendingTaskSubscribersCleanup.php
2 months ago
SimpleWorker.php
1 year ago
StatisticsExport.php
2 months ago
SubscriberLimitNotificationWorker.php
2 months ago
SubscriberLinkTokens.php
1 year ago
SubscribersCountCacheRecalculation.php
2 weeks ago
SubscribersEngagementScore.php
3 days ago
SubscribersLastEngagement.php
2 months ago
SubscribersSegmentsCountSync.php
2 weeks ago
SubscribersStatsReport.php
1 year ago
Tracks.php
9 months ago
UnconfirmedSubscribersCleanup.php
2 months ago
UnsubscribeTokens.php
1 month ago
WooCommercePastOrders.php
1 year ago
WooCommerceSync.php
3 years ago
WorkersFactory.php
2 weeks ago
index.php
3 years ago
ReEngagementEmailsScheduler.php
34 lines
| 1 | <?php declare(strict_types = 1); |
| 2 | |
| 3 | namespace MailPoet\Cron\Workers; |
| 4 | |
| 5 | if (!defined('ABSPATH')) exit; |
| 6 | |
| 7 | |
| 8 | use MailPoet\Entities\ScheduledTaskEntity; |
| 9 | use MailPoet\Newsletter\Scheduler\ReEngagementScheduler; |
| 10 | use MailPoetVendor\Carbon\Carbon; |
| 11 | |
| 12 | class ReEngagementEmailsScheduler extends SimpleWorker { |
| 13 | const TASK_TYPE = 'schedule_re_engagement_email'; |
| 14 | |
| 15 | /** @var ReEngagementScheduler */ |
| 16 | private $reEngagementEmailsScheduler; |
| 17 | |
| 18 | public function __construct( |
| 19 | ReEngagementScheduler $reEngagementEmailsScheduler |
| 20 | ) { |
| 21 | parent::__construct(); |
| 22 | $this->reEngagementEmailsScheduler = $reEngagementEmailsScheduler; |
| 23 | } |
| 24 | |
| 25 | public function processTaskStrategy(ScheduledTaskEntity $task, $timer) { |
| 26 | $this->reEngagementEmailsScheduler->scheduleAll(); |
| 27 | return true; |
| 28 | } |
| 29 | |
| 30 | public function getNextRunDate() { |
| 31 | return Carbon::now()->millisecond(0)->addDay(); |
| 32 | } |
| 33 | } |
| 34 |