@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | $em->flush(); |
| 53 | 53 | |
| 54 | 54 | $end = microtime(true); |
| 55 | - $duration = sprintf('%0.2f', $end - $start); |
|
| 55 | + $duration = sprintf('%0.2f', $end-$start); |
|
| 56 | 56 | $output->writeln("Cron run completed in $duration seconds"); |
| 57 | 57 | } |
| 58 | 58 | |
@@ -100,11 +100,11 @@ discard block |
||
| 100 | 100 | $statusStr = 'failed'; |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | - $durationStr = sprintf('%0.2f', $jobEnd - $jobStart); |
|
| 103 | + $durationStr = sprintf('%0.2f', $jobEnd-$jobStart); |
|
| 104 | 104 | $output->writeln("$statusStr in $durationStr seconds"); |
| 105 | 105 | |
| 106 | 106 | // Record the result |
| 107 | - $this->recordJobResult($job, $jobEnd - $jobStart, $jobOutput->getOutput(), $returnCode); |
|
| 107 | + $this->recordJobResult($job, $jobEnd-$jobStart, $jobOutput->getOutput(), $returnCode); |
|
| 108 | 108 | |
| 109 | 109 | // And update the job with it's next scheduled time |
| 110 | 110 | $newTime = new \DateTime(); |
@@ -9,7 +9,6 @@ |
||
| 9 | 9 | use Symfony\Component\Console\Input\InputInterface; |
| 10 | 10 | use Symfony\Component\Console\Input\InputOption; |
| 11 | 11 | use Symfony\Component\Console\Output\OutputInterface; |
| 12 | -use Alpixel\Bundle\CronBundle\Entity\CronJobResult; |
|
| 13 | 12 | |
| 14 | 13 | class CronScanCommand extends ContainerAwareCommand |
| 15 | 14 | { |