Cron.php 583 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Mtf\Util\Command\Cli;
  7. use Magento\Mtf\Util\Command\Cli;
  8. /**
  9. * Handle cron for tests executions.
  10. */
  11. class Cron extends Cli
  12. {
  13. /**
  14. * Parameter for cron run command.
  15. */
  16. const PARAM_CRON_RUN = 'cron:run';
  17. /**
  18. * Run cron.
  19. *
  20. * @return void
  21. */
  22. public function run()
  23. {
  24. parent::execute(Cron::PARAM_CRON_RUN);
  25. sleep(60); // According to Magento 2 documentation cron job running takes 600 ms
  26. }
  27. }