Showing results for 
Search instead for 
Did you mean: 

Custom Cron Jobs


Custom Cron Jobs

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.

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() {


Just not even sure what is the syntax for running a cli command from a Magento module?



Re: Custom Cron Jobs

Hello @Zendo



Try , it is provided command to run any cron.


hope it will help you

Re: Custom Cron Jobs

Thanks for pointing to good direction ^^