0

I have created a custom module which will read order edi files and import orders in magento. To run this in scheduled basis, I have written cron for this job.

<job name="import_order_edi" instance="Singh\Import\Cron\OrderImport" method="execute">
        <schedule>* * * * *</schedule>
</job>

in my OrderImport.php file I am calling the execute method of main controller class where code to create order is written.

$this->_order->execute();

$this->_order is the object of main controller class where code to read file and create order is written. But when I run the cron, the memory of server reaches to 97 and CPU to 99%, and cron stops, with no orders imported in magento. But when I run this controller from web-browser, order got created. Why my cron stops executing ? But through web-browser its working?

Abhimanyu Singh
  • 506
  • 3
  • 9
  • 22

0 Answers0