Your IP : 127.0.0.1
<?php
/**
* Mirasvit
*
* This source file is subject to the Mirasvit Software License, which is available at https://mirasvit.com/license/.
* Do not edit or add to this file if you wish to upgrade the to newer versions in the future.
* If you wish to customize this module for your needs.
* Please refer to http://www.magentocommerce.com for more information.
*
* @category Mirasvit
* @package mirasvit/module-search-ultimate
* @version 2.3.2
* @copyright Copyright (C) 2024 Mirasvit (https://mirasvit.com/)
*/
declare(strict_types=1);
namespace Mirasvit\SearchReport\Console\Command;
use Magento\Framework\ObjectManagerInterface;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class CronCommand extends Command
{
private $objectManager;
public function __construct(
ObjectManagerInterface $objectManager
) {
$this->objectManager = $objectManager;
parent::__construct();
}
protected function configure(): void
{
$this->setName('mirasvit:search-report:cron')
->setDescription('For test purpose');
parent::configure();
}
protected function execute(InputInterface $input, OutputInterface $output): int
{
$this->objectManager->get(\Mirasvit\SearchReport\Cron\CleanupCron::class)->execute();
return 0;
}
}