aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/console/command/cron
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/console/command/cron')
-rw-r--r--phpBB/phpbb/console/command/cron/run_all.php23
1 files changed, 16 insertions, 7 deletions
diff --git a/phpBB/phpbb/console/command/cron/run_all.php b/phpBB/phpbb/console/command/cron/run_all.php
index b398e46ab9..2f8166b857 100644
--- a/phpBB/phpbb/console/command/cron/run_all.php
+++ b/phpBB/phpbb/console/command/cron/run_all.php
@@ -1,11 +1,16 @@
<?php
/**
*
-* @package phpBB3
-* @copyright (c) 2014 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
+
namespace phpbb\console\command\cron;
use Symfony\Component\Console\Input\InputInterface;
@@ -54,16 +59,17 @@ class run_all extends \phpbb\console\command\command
/**
* Executes the function.
+ *
* Tries to acquire the cron lock, then runs all ready cron tasks.
* If the cron lock can not be obtained, an error message is printed
- * and the exit status is set to 1.
- *If the verbose option is specified, each start of a task is printed.
- Otherwise there is no output.
+ * and the exit status is set to 1.
+ * If the verbose option is specified, each start of a task is printed.
+ * Otherwise there is no output.
*
* @param InputInterface $input The input stream, unused here
* @param OutputInterface $output The output stream, used for printig verbose-mode
* and error information.
- * @return boolean 0 if all is ok, 1 if a lock error occured
+ * @return int 0 if all is ok, 1 if a lock error occured
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
@@ -81,10 +87,13 @@ class run_all extends \phpbb\console\command\command
$task->run();
}
$this->lock_db->release();
+
+ return 0;
}
else
{
$output->writeln('<error>' . $this->user->lang('CRON_LOCK_ERROR') . '</error>');
+ return 1;
}
}
}