Conditions | 5 |
Paths | 8 |
Total Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
56 | public function execute() |
||
57 | { |
||
58 | $this->lastRuns = $this->getLastRuns(); |
||
59 | $jobsExecuted = false; |
||
60 | foreach ($this->jobs as $job) { |
||
61 | $uid = $job->getUid(); |
||
62 | $due = $job->getDue(); |
||
63 | if (!empty($this->lastRuns[$uid])) { |
||
64 | if ($this->now < $this->lastRuns[$uid]) { |
||
65 | continue; |
||
66 | } |
||
67 | } |
||
68 | $job->execute(); |
||
69 | $jobsExecuted = true; |
||
70 | $this->lastRuns[$uid] = $due; |
||
71 | } |
||
72 | if ($jobsExecuted) { |
||
73 | $this->saveLastRuns(); |
||
74 | } |
||
75 | } |
||
76 | |||
113 |