Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

running job multiple times

Hi,
I have a requirement where I need to run sub job job multiple times based on the value of a count. Say, if count is 4 then the subjob should run 4 times.
Is there any ways to run same sub job multiple times ?

Thanks and Regards,
Biswajit
Labels (2)
3 Replies
Anonymous
Not applicable
Author

Hi,
I simulate a job like
rowGenerator--Main-->JavaRow--OnComponentOk-->Loop--Iterate-->Runjob
In rowGenerator,I just set a int number "count" by random.
In JavaRow, I wrote code :globalMap.put("count", input_row.count).
In loop, I set ((Integer)globalMap.get("count")) for Max.
In Subjob, I just put a tsystem .
And this work fine.
Best regards
Anonymous
Not applicable
Author

Hi ,
Thanks for the reply.It works.
Can you please tell me how I an pass different values using this. Say in TrunJob I need to pass different numeric value to tRunJOb on each loop. Is it possible to do that?

Thanks and Regards,
Biswajit
Anonymous
Not applicable
Author

Hi,
Base on the first simulation,
I modify a job like.
Loop--Iterate-->rowGenerator--Main-->JavaRow--OnComponentOk-->Loop--Iterate-->Runjob
|
OnComponentOk
|
v
tSetEvn
In first loop: I set defaut.I just want to simulate that job runs.
In tSetEvn: I set Name: "count" and Value: (""+globalMap.get("count"))
In subjob , I still use tsystem,but with a new code: "cmd /c echo HELLO "+System.getProperty("count").
So, you can see that this job run several time and with different values.
I hope its useful
Best regards