Hi, I'm no Magento expert, especially not 2.2. I need to run few scheduled cli commands every night, to import product data through Magmi and do some few other basic things through command line.
Is the public function in this file, where the specific commands should be run? (I followed through this DOC.
<?php
namespace Zen\ImportCron\Cron;
use \Psr\Log\LoggerInterface;
class cron {
protected $logger;
public function __construct(LoggerInterface $logger) {
$this->logger = $logger;
}
/**
* Write to system.log
*
* @return void
*/
public function execute() {
$this->logger->info('ImportCron');
}
}
Just not even sure what is the syntax for running a cli command from a Magento module?
Solved! Go to Solution.
Hello @Zendo
Try https://github.com/netz98/n98-magerun2 , it is provided command to run any cron.
hope it will help you
Hello @Zendo
Try https://github.com/netz98/n98-magerun2 , it is provided command to run any cron.
hope it will help you
Thanks for pointing to good direction ^^