Skip to main content

Cron job to create partial invoice and send email of MS orders

First of all, configure cron schedule in app/code/Frans/MultiShip/etc/crontab.xmlConfig --> Frans --> MultiShip --> Cron Settings

image.png


Then execute ./bin/magento cron:run
Make sure table `cron_schedule` has rows with job_code='multiship_shipment_email_cron'

Each cron execution will create logging rows into table `frans_ship_email_log` 

 

_____

To debug the cron:

1/ Sql to find shipments not invoiced:

SELECT *,shipment_status from sales_shipment
where invoice_id IS NULL AND ms_email_sent_at IS NULL AND created_at > date_sub(now(),INTERVAL 3 day)
and shipment_status in (4,11)