@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | /** |
166 | 166 | * Add results. |
167 | 167 | * |
168 | - * @param Alpixel\Bundle\CronBundle\Entity\CronJobResult $results |
|
168 | + * @param CronJobResult $results |
|
169 | 169 | */ |
170 | 170 | public function addCronJobResult(\Alpixel\Bundle\CronBundle\Entity\CronJobResult $results) |
171 | 171 | { |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | /** |
186 | 186 | * Set mostRecentRun. |
187 | 187 | * |
188 | - * @param Alpixel\Bundle\CronBundle\Entity\CronJobResult $mostRecentRun |
|
188 | + * @param CronJobResult $mostRecentRun |
|
189 | 189 | */ |
190 | 190 | public function setMostRecentRun(\Alpixel\Bundle\CronBundle\Entity\CronJobResult $mostRecentRun) |
191 | 191 | { |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | /** |
196 | 196 | * Get mostRecentRun. |
197 | 197 | * |
198 | - * @return Alpixel\Bundle\CronBundle\Entity\CronJobResult |
|
198 | + * @return CronJobResult |
|
199 | 199 | */ |
200 | 200 | public function getMostRecentRun() |
201 | 201 | { |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | /** |
158 | 158 | * Set job. |
159 | 159 | * |
160 | - * @param Alpixel\Bundle\CronBundle\Entity\CronJob $job |
|
160 | + * @param CronJob $job |
|
161 | 161 | */ |
162 | 162 | public function setJob(\Alpixel\Bundle\CronBundle\Entity\CronJob $job) |
163 | 163 | { |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | /** |
168 | 168 | * Get job. |
169 | 169 | * |
170 | - * @return Alpixel\Bundle\CronBundle\Entity\CronJob |
|
170 | + * @return CronJob |
|
171 | 171 | */ |
172 | 172 | public function getJob() |
173 | 173 | { |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $entityManager->flush(); |
52 | 52 | |
53 | 53 | $end = microtime(true); |
54 | - $duration = sprintf('%0.2f', $end - $start); |
|
54 | + $duration = sprintf('%0.2f', $end-$start); |
|
55 | 55 | $output->writeln("Cron run completed in $duration seconds"); |
56 | 56 | } |
57 | 57 | |
@@ -99,11 +99,11 @@ discard block |
||
99 | 99 | $statusStr = 'failed'; |
100 | 100 | } |
101 | 101 | |
102 | - $durationStr = sprintf('%0.2f', $jobEnd - $jobStart); |
|
102 | + $durationStr = sprintf('%0.2f', $jobEnd-$jobStart); |
|
103 | 103 | $output->writeln("$statusStr in $durationStr seconds"); |
104 | 104 | |
105 | 105 | // Record the result |
106 | - $this->recordJobResult($job, $jobEnd - $jobStart, $jobOutput->getOutput(), $returnCode); |
|
106 | + $this->recordJobResult($job, $jobEnd-$jobStart, $jobOutput->getOutput(), $returnCode); |
|
107 | 107 | |
108 | 108 | // And update the job with it's next scheduled time |
109 | 109 | $interval = new \DateInterval($job->getInterval()); |