Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
reiteratedjob.php
1<?php
10
13
18class ReiteratedJob extends Job
19{
25 public function actualize()
26 {
27 $agentName = static::getAgentName();
28 self::removeAgent($agentName);
29
31 {
32 return $this;
33 }
34
35 $reiterated = LetterTable::getRow([
36 'select' => ['AUTO_SEND_TIME'],
37 'filter' => [
38 '=CAMPAIGN.ACTIVE' => 'Y',
39 '=REITERATE' => 'Y',
40 '=STATUS' => LetterTable::STATUS_WAIT,
41 ],
42 'order' => ['AUTO_SEND_TIME' => 'ASC'],
43 'limit' => 1
44 ]);
45 if (!$reiterated)
46 {
47 return $this;
48 }
49
50 $interval = Option::get('sender', 'reiterate_interval');
51 self::addAgent($agentName, $interval, $reiterated['AUTO_SEND_TIME']);
52
53 return $this;
54 }
55
61 public static function getAgentName()
62 {
63 return '\Bitrix\Sender\MailingManager::checkPeriod();';
64 }
65}
static isReiteratedJobCron()
Definition env.php:38
addAgent($agentName, $interval=60, $nextDateExec='')
Definition job.php:50
removeAgent($agentName)
Definition job.php:69