@@ -136,6 +136,9 @@ |
||
136 | 136 | $job->setNextRun($newTime); |
137 | 137 | } |
138 | 138 | |
139 | + /** |
|
140 | + * @param string $output |
|
141 | + */ |
|
139 | 142 | protected function recordJobResult(EntityManager $em, CronJob $job, $timeTaken, $output, $resultCode) |
140 | 143 | { |
141 | 144 | // Create a new CronJobResult |
@@ -21,8 +21,8 @@ |
||
21 | 21 | protected function configure() |
22 | 22 | { |
23 | 23 | $this->setName("cron:run") |
24 | - ->setDescription("Runs any currently schedule cron jobs") |
|
25 | - ->addArgument("job", InputArgument::OPTIONAL, "Run only this job (if enabled)"); |
|
24 | + ->setDescription("Runs any currently schedule cron jobs") |
|
25 | + ->addArgument("job", InputArgument::OPTIONAL, "Run only this job (if enabled)"); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | protected function execute(InputInterface $input, OutputInterface $output) |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | /** |
137 | 137 | * Set nextRun |
138 | 138 | * |
139 | - * @param datetime $nextRun |
|
139 | + * @param \DateTime $nextRun |
|
140 | 140 | */ |
141 | 141 | public function setNextRun($nextRun) |
142 | 142 | { |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | /** |
157 | 157 | * Add results |
158 | 158 | * |
159 | - * @param Alpixel\Bundle\CronBundle\Entity\CronJobResult $results |
|
159 | + * @param CronJobResult $results |
|
160 | 160 | */ |
161 | 161 | public function addCronJobResult(\Alpixel\Bundle\CronBundle\Entity\CronJobResult $results) |
162 | 162 | { |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | /** |
177 | 177 | * Set mostRecentRun |
178 | 178 | * |
179 | - * @param Alpixel\Bundle\CronBundle\Entity\CronJobResult $mostRecentRun |
|
179 | + * @param CronJobResult $mostRecentRun |
|
180 | 180 | */ |
181 | 181 | public function setMostRecentRun(\Alpixel\Bundle\CronBundle\Entity\CronJobResult $mostRecentRun) |
182 | 182 | { |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | /** |
187 | 187 | * Get mostRecentRun |
188 | 188 | * |
189 | - * @return Alpixel\Bundle\CronBundle\Entity\CronJobResult |
|
189 | + * @return CronJobResult |
|
190 | 190 | */ |
191 | 191 | public function getMostRecentRun() |
192 | 192 | { |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | /** |
151 | 151 | * Set job |
152 | 152 | * |
153 | - * @param Alpixel\Bundle\CronBundle\Entity\CronJob $job |
|
153 | + * @param CronJob $job |
|
154 | 154 | */ |
155 | 155 | public function setJob(\Alpixel\Bundle\CronBundle\Entity\CronJob $job) |
156 | 156 | { |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | /** |
161 | 161 | * Get job |
162 | 162 | * |
163 | - * @return Alpixel\Bundle\CronBundle\Entity\CronJob |
|
163 | + * @return CronJob |
|
164 | 164 | */ |
165 | 165 | public function getJob() |
166 | 166 | { |
@@ -13,8 +13,8 @@ |
||
13 | 13 | protected function configure() |
14 | 14 | { |
15 | 15 | $this->setName("cron:enable-job") |
16 | - ->setDescription("Enables a cron job") |
|
17 | - ->addArgument("job", InputArgument::REQUIRED, "Name of the job to enable"); |
|
16 | + ->setDescription("Enables a cron job") |
|
17 | + ->addArgument("job", InputArgument::REQUIRED, "Name of the job to enable"); |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | protected function execute(InputInterface $input, OutputInterface $output) |
@@ -17,8 +17,8 @@ |
||
17 | 17 | protected function configure() |
18 | 18 | { |
19 | 19 | $this->setName("cron:status") |
20 | - ->setDescription("Displays the current status of cron jobs") |
|
21 | - ->addArgument("job", InputArgument::OPTIONAL, "Show information for only this job"); |
|
20 | + ->setDescription("Displays the current status of cron jobs") |
|
21 | + ->addArgument("job", InputArgument::OPTIONAL, "Show information for only this job"); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | protected function execute(InputInterface $input, OutputInterface $output) |
@@ -23,9 +23,9 @@ |
||
23 | 23 | protected function configure() |
24 | 24 | { |
25 | 25 | $this->setName("cron:scan") |
26 | - ->setDescription("Scans for any new or deleted cron jobs") |
|
27 | - ->addOption('keep-deleted', 'k', InputOption::VALUE_NONE, 'If set, deleted cron jobs will not be removed') |
|
28 | - ->addOption('default-disabled', 'd', InputOption::VALUE_NONE, 'If set, new jobs will be disabled by default'); |
|
26 | + ->setDescription("Scans for any new or deleted cron jobs") |
|
27 | + ->addOption('keep-deleted', 'k', InputOption::VALUE_NONE, 'If set, deleted cron jobs will not be removed') |
|
28 | + ->addOption('default-disabled', 'd', InputOption::VALUE_NONE, 'If set, new jobs will be disabled by default'); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | protected function execute(InputInterface $input, OutputInterface $output) |
@@ -16,8 +16,8 @@ |
||
16 | 16 | protected function configure() |
17 | 17 | { |
18 | 18 | $this->setName("cron:pruneLogs") |
19 | - ->setDescription("Prunes the logs for each cron job, leaving only recent failures and the most recent success") |
|
20 | - ->addArgument('job', InputArgument::OPTIONAL, 'Operate only on this job'); |
|
19 | + ->setDescription("Prunes the logs for each cron job, leaving only recent failures and the most recent success") |
|
20 | + ->addArgument('job', InputArgument::OPTIONAL, 'Operate only on this job'); |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | protected function execute(InputInterface $input, OutputInterface $output) |
@@ -15,8 +15,8 @@ |
||
15 | 15 | protected function configure() |
16 | 16 | { |
17 | 17 | $this->setName("cron:disable-job") |
18 | - ->setDescription("Disables a cron job") |
|
19 | - ->addArgument("job", InputArgument::REQUIRED, "Name of the job to disable"); |
|
18 | + ->setDescription("Disables a cron job") |
|
19 | + ->addArgument("job", InputArgument::REQUIRED, "Name of the job to disable"); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | protected function execute(InputInterface $input, OutputInterface $output) |
@@ -12,6 +12,6 @@ |
||
12 | 12 | ->getEntityManager() |
13 | 13 | ->createQuery("DELETE CronBundle:CronJobResult result") |
14 | 14 | ->getResult() |
15 | - ; |
|
15 | + ; |
|
16 | 16 | } |
17 | 17 | } |