I have a task to optimize a process and for that, I need to orchestrate multiple shell scripts using python.
Let's assume I have 13 ksh scripts. I want to build the python script such that
- some scripts run in parallel
- some scripts are triggered after the completion of their predecessor scripts
- some scripts are dependent on the output of their predecessor scripts and run according to a decision box.
I have summarized the above points in a flow diagram.
There is also a special requirement for failure as follows:
- After completion of each shell it should create a particular flag
- If a ksh (assume shell_script_3) fails then the program should stop and not create a flag
- Once the job is fixed, when the program is re-run it should start from the ksh which is succeeding the failed ksh (shell_script_5)
I need help in designing a python script for the above requirement.
