Magento2 loading products from external source with a cron job
I'm loading catalog products from external source to my Magento website for that i have wrote 2 processes (2 separate cron jobs).
1st Process : Loads all the products(approx 500+) from external source(with soap) into magento custom table.
2nd Process : At a time this will read first 10 products from the custom table and then it will create csv file with this 10 products and then import csv into Magento catalog . if this process completed successfully then it will delete this 10 records from the custom table . And then this should initiate next run as separate thread This process goes on till custom table becomes empty.
Here 2nd process connected with 1st process ,so i need to setup cron job once 1st process(1st cron) completed then it should start initiating 2nd process(could be 2nd cron).
Suggest me how this can be achieved ?