run
class run extends command
Properties
protected user | $user | from command | |
protected manager | $cron_manager | ||
protected db | $lock_db |
Methods
Create a styled progress bar
Sets the command name and description
Executes the command cron:run.
Executes all ready cron tasks.
Executes a given cron task, if it is ready.
Details
in
command at line 45
ProgressBar
create_progress_bar(int $max, SymfonyStyle $io, OutputInterface $output, bool $message = false)
Create a styled progress bar
at line 49
protected null
configure()
Sets the command name and description
at line 78
protected int
execute(InputInterface $input, OutputInterface $output)
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.
at line 112
protected int
run_all(InputInterface $input, OutputInterface $output)
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.
at line 155
protected int
run_one(InputInterface $input, OutputInterface $output, string $task_name)
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.