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

First of all, configure cron schedule in Config --&gt; Frans --&gt; MultiShip --&gt; Cron Settings

[![image.png](https://frdocs.socalappsolutions.com/uploads/images/gallery/2025-01/scaled-1680-/vZhimage.png)](https://frdocs.socalappsolutions.com/uploads/images/gallery/2025-01/vZhimage.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<br></br>where invoice_id IS NULL AND ms_email_sent_at IS NULL AND created_at > date_sub(now(),INTERVAL 3 day)<br></br>and shipment_status in (4,11)<br></br>
```