I have the following design question and I would like to get some input.
We have a long complex data handling process by our company.
The process can not run in one sequence and in one go.
There are different steps that are spreading between 8pm and 8am next day.
Basically, at every execution, it just needs to run one of the steps but it relays on the successful execution from the previous step.
Just to describe briefly the process
The process starts at 8pm every day, waiting for some files to come into a ftp.
So the step1 needs to be executed at 8pm and just check if the file is there if not send notification.
Step2 needs to be executed between 9pm and 9:30 becasue it relays in the data from previous step and some additional data which is coming up in this time frame.
Then there are 5-6 more steps with similar logic till 7am morning next day. Each on his on time frame
My goal is to use just one script and one scheduled task to handle the process.
At this moment how I addressed is by splitting the script in different steps and each one having his own “ExecutionRunTimeFrame”.
So I create a condition, if the script is executed between 8:00 and 8:30 then it can only run the first step from the script.
With just 1 schedule tasks and multiple time triggers, based on the time of the execution it will just run the step which is defined in this exeuctionRunTimesFrame.
The solution works but I am wondering if someone has a different view of how this can be handled.
Thanks for your feedback,