I am creating an app using magento 2
where user is supposed to upload csv
file containing:
- Name of base image
- Name of clipart
- height
- Width
- top margin
- left margin
using above data I am suppose to combine both the images.
I am using cronjob
to finish up this task, like as soon as user clicks on generate images first I am inserting all data into database and then using cron job
, combining all the images after each minute.
The problem is cron job
is still inserting data even after it has finished combining images. I want to stop cron job
as soon as it finishes the task.
can I run cron job
based on some condition or something?