[ Index ]

PHP Cross Reference of phpBB-3.3.7-deutsch

title

Body

[close]

/phpbb/console/command/cron/ -> run.php (summary)

This file is part of the phpBB Forum Software package.

Copyright: (c) phpBB Limited
License: GNU General Public License, version 2 (GPL-2.0)
File Size: 173 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

run:: (5 methods):
  __construct()
  configure()
  execute()
  run_all()
  run_one()


Class: run  - X-Ref

__construct(\phpbb\user $user, \phpbb\cron\manager $cron_manager, \phpbb\lock\db $lock_db)   X-Ref
Construct method

param: \phpbb\user $user The user object (used to get language information)
param: \phpbb\cron\manager $cron_manager The cron manager containing
param: \phpbb\lock\db $lock_db The lock for accessing database.

configure()   X-Ref
Sets the command name and description

return: null

execute(InputInterface $input, OutputInterface $output)   X-Ref
Executes the command cron:run.

Tries to acquire the cron lock, then if no argument has been given 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.
If an argument is given to the command, only the task whose name matches the
argument will be started. If verbose option is specified,
an info message containing the name of the task is printed.
If no task matches the argument given, an error message is printed
and the exit status is set to 2.

param: InputInterface $input The input stream used to get the argument and verboe option.
param: OutputInterface $output The output stream, used for printing verbose-mode and error information.
return: int 0 if all is ok, 1 if a lock error occurred and 2 if no task matching the argument was found.

run_all(InputInterface $input, OutputInterface $output)   X-Ref
Executes all ready cron tasks.

If verbose mode is set, an info message will be printed if there is no task to
be run, or else for each starting task.

param: InputInterface $input The input stream used to get the argument and verbose option.
param: OutputInterface $output The output stream, used for printing verbose-mode and error information.
return: int 0

run_one(InputInterface $input, OutputInterface $output, $task_name)   X-Ref
Executes a given cron task, if it is ready.

If there is a task whose name matches $task_name, it is run and 0 is returned.
and if verbose mode is set, print an info message with the name of the task.
If there is no task matching $task_name, the function prints an error message
and returns with status 2.

param: InputInterface $input The input stream used to get the argument and verbose option.
param: OutputInterface $output The output stream, used for printing verbose-mode and error information.
param: string $task_name The name of the task that should be run.
return: int 0 if all is well, 2 if no task matches $task_name.



Generated: Thu Mar 24 21:31:15 2022 Cross-referenced by PHPXref 0.7.1