Project

General

Profile

Actions

Bug #87312

closed

Scheduler fails at ConsoleCommand at the same time with the same idenitifer

Added by Guido Schmechel almost 6 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
scheduler
Target version:
-
Start date:
2018-12-31
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Context:

  • Given is a Symfony console command registered with "test:job"
  • This job has one required argument "message"
  • Activate two tasks in the scheduler, e.g. every minute
  • TYPO3 Cronjob runs every minute, too (CLI)
  • Task 1 registered with argument "hello", Task 2 registered with argument "world"

Problem:

  • TYPO3 processes the jobs sequential
  • First call is "scheduler:run" via CLI
  • Second call is our Task 1 (hello)
  • vendor/symfony/console/Command/Command.php has no "command". Here is the magic to add these "command". So we have now "test:job" as command and "hello" as message. Job runs successfully.
  • Third call (Task 2) has only the argument "message" (world) and TYPO3 runs the job without the "command" argument
  • The Job exit with code 255 and save the trace into the database field

Error message

a:5:{s:4:"code";i:0;s:7:"message";s:42:"Not enough arguments (missing: "command").";s:4:"file";s:66:"project\vendor\symfony\console\Input\Input.php";s:4:"line";i:76;s:11:"traceString";s:2742:"#0 project\vendor\symfony\console\Input\Input.php(42): Symfony\Component\Console\Input\Input->validate()
#1 project\vendor\symfony\console\Input\ArrayInput.php(34): Symfony\Component\Console\Input\Input->__construct(Object(Symfony\Component\Console\Input\InputDefinition))
#2 project\public\typo3\sysext\scheduler\Classes\Task\ExecuteSchedulableCommandTask.php(88): Symfony\Component\Console\Input\ArrayInput->__construct(Array, Object(Symfony\Component\Console\Input\InputDefinition))
#3 project\public\typo3\sysext\scheduler\Classes\Scheduler.php(180): TYPO3\CMS\Scheduler\Task\ExecuteSchedulableCommandTask->execute()
#4 project\public\typo3\sysext\scheduler\Classes\Command\SchedulerCommand.php(145): TYPO3\CMS\Scheduler\Scheduler->executeTask(Object(TYPO3\CMS\Scheduler\Task\ExecuteSchedulableCommandTask))
#5 project\public\typo3\sysext\scheduler\Classes\Command\SchedulerCommand.php(99): TYPO3\CMS\Scheduler\Command\SchedulerCommand->loopTasks()
#6 project\vendor\symfony\console\Command\Command.php(255): TYPO3\CMS\Scheduler\Command\SchedulerCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 project\vendor\symfony\console\Application.php(901): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 project\vendor\symfony\console\Application.php(262): Symfony\Component\Console\Application->doRunCommand(Object(TYPO3\CMS\Scheduler\Command\SchedulerCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 project\vendor\symfony\console\Application.php(145): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 project\public\typo3\sysext\core\Classes\Console\CommandRequestHandler.php(63): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 project\public\typo3\sysext\core\Classes\Console\CommandApplication.php(48): TYPO3\CMS\Core\Console\CommandRequestHandler->handleRequest(Object(Symfony\Component\Console\Input\ArgvInput))
#12 project\public\typo3\sysext\core\bin\typo3(23): TYPO3\CMS\Core\Console\CommandApplication->run()
#13 project\public\typo3\sysext\core\bin\typo3(24): {closure}()
#14 {main}";}
Actions

Also available in: Atom PDF