Skip to main content

Server configuration - Magento 2

[missing screenshot: confluence_logo_new.png]

Crons

Main cron

The main NetSuite processing cron is a bin/magento command. The minimum amount of configuration is to set this cron to run every few minutes:

*/2 * * * * php /home/mt_dev/public_html/oDaBS2962/bin/magento netsuite:cron --mode all > /dev/null 2>&1

This setting will take care of all NetSuite synchronization: grab product changes, grab stocks, export orders, import invoices etc. Since this is single threaded, it can be slow. If you have multiple NetSuite web users, you can speed up the process by adding multiple cron entries with different modes:

  • export - takes care of pushing orders and invoices to NetSuite
  • import - takes care of importing products, invoices, orders and fulfillments
  • stock - takes care of stock updates

The modes can be combined with a comma. Here is an example that runs exports and imports in parallel:

*/2 * * * * php /home/mt_dev/public_html/oDaBS2962/bin/magento netsuite:cron --mode import,stock > /dev/null 2>&1
*/2 * * * * php /home/mt_dev/public_html/oDaBS2962/bin/magento netsuite:cron --mode export > /dev/null 2>&1