| 12345678910111213141516171819202122232425262728293031 |
- <?php
- namespace ModulesGarden\Servers\ProxmoxCloudVps\App\Cron;
- use ModulesGarden\Servers\ProxmoxCloudVps\App\Helpers\ProxmoxAddonValidator;
- use ModulesGarden\Servers\ProxmoxCloudVps\Core\ModuleConstants;
- use Symfony\Component\Console\Input\ArgvInput;
- use Symfony\Component\Console\Output\ConsoleOutput;
- use Symfony\Component\Console\Style\SymfonyStyle;
- class MainCron extends \ModulesGarden\ProxmoxAddon\Core\CommandLine\CronManager
- {
- public function run(){
- ProxmoxAddonValidator::isInstalledOrFail();
- $this->loadCommandsControllers($this->getCommands());
- $input = new ArgvInput();
- $output = new ConsoleOutput();
- $this->configureIO($input, $output);
- $io = new SymfonyStyle($input, $output);
- $io->error(sprintf("This cron is depracted since version 3.0.0, please run: %s",
- ModuleConstants::getFullPathWhmcs() . DS .'modules'. DS .'addons'. DS .'proxmoxAddon'.DS.'cron'.DS.'cron.php'));
- //queue
- $command = $this ->find('queue');
- $command->run( $input, $output , $io );
- //update-server-usage
- $command = $this ->find('update-server-usage');
- $command->run( $input, $output, $io );
- }
- }
|