Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Running the jobs sequentially instead of parallel

Hi All,

My script runs multiple jobs by iterating in a loop one by one. They are getting executed in parallel where as i want them to run sequentially one only after another has finished execution. For ensuring this i have added this logic in my code:

[Code for Job name reading, parameters setting goes here]


while (((infoJob.getStatus().toString().matches("Scheduled")) || (infoJob.getStatus().toString().matches("Running"))) {

  jcsOut.println("infojob still running"+infoJob.getStatus().toString());


This should run after each job's persist statement.

Ideally the loop should end as soon as the job attains 'Error' or 'Completed' state i.e. the job ends but when i am running the script

this while loop is running infinitely thus causing an infinite loop.

Because of which the first job ends but the script does not move forward to next job.

Please help me what i am doing wrong here or if there is any other way to make the jobs run sequentially through Redwood.



Former Member
Not what you were looking for? View more on this topic or Ask a question