diff --git a/Server/application/job/WorkbenchMomentsJob.php b/Server/application/job/WorkbenchMomentsJob.php index 36d46ec13..a24baf8a5 100644 --- a/Server/application/job/WorkbenchMomentsJob.php +++ b/Server/application/job/WorkbenchMomentsJob.php @@ -76,7 +76,13 @@ class WorkbenchMomentsJob if (!$config) { continue; } - + $startTime = strtotime(date('Y-m-d '. $config['startTime'])); + $endTime = strtotime(date('Y-m-d '. $config['endTime'])); + // 如果时间不符,则跳过 + if($startTime > time() || $endTime < time()){ + continue; + } + // 获取设备 $devices = $this->getDevice($workbench, $config); if (empty($devices)) { @@ -267,7 +273,7 @@ class WorkbenchMomentsJob protected function getContentLibrary($workbench, $config) { $contentids = json_decode($config['contentLibraries'], true); - if (empty($contentids)) { + if (empty($contentids)) { return false; }