Solved

wait for job completion command line

  • 23 August 2022
  • 5 replies
  • 270 views

Userlevel 3
Badge +13

Hi Team,

Greetings! 

I can able to run the workflow using below command which i saved in .bat file, which will start the workflow with job id. i want to monitor that job id using another command as wait for job completion in same .bat file and save that output to the text file whether it got completed or not. is there any option available for it ? 

qoperation execute -af execute_workflow.xml -associations workflow_engine -workflowName baas_workflow -tf c:\tokenFile

 

<TMMsg_CreateTaskResp taskId="4231">

  <jobIds val="18722"/>

</TMMsg_CreateTaskResp>
 

icon

Best answer by Amey Karandikar 24 August 2022, 12:38

View original

5 replies

Userlevel 7
Badge +23

Hi @Allan0105 , hope all is well!

You should be able to do all this within a Workflow:

https://documentation.commvault.com/2022e/expert/49663_built_in_activities_for_workflows.html

You can use Decisions to determine if an email is sent out (there’s an Email operation) using the previous jobs as inputs.

Userlevel 3
Badge +13

Hi @Allan0105 , hope all is well!

You should be able to do all this within a Workflow:

https://documentation.commvault.com/2022e/expert/49663_built_in_activities_for_workflows.html

You can use Decisions to determine if an email is sent out (there’s an Email operation) using the previous jobs as inputs.

Thanks Mike. I am good. hope you are doing good too. 

 

I will just explain, what i was trying to do. we have an BigFix which is used for windows patching. i have created an workflow in commvault which will stop the services , suspend job , disabled schedule etc. which is working fine. 

 

Now i am trying to make BigFix to call our workflow for that i was creating an .bat file in CS which will have a command to execute the workflow, next step is i want to monitor the jobid which workflow created and send back the update to BigFix the status of the job. so i was thinking will put commands on .bat and capture the output of text file which i will use BigFix to capture the output so BigFix will know whether the workflow got completed or not. 

 

Same these things. if we can do with any other method also i am fine. 

Userlevel 3
Badge +6

You can use the qlist job command. there is a -waitForJobComplete option

 

https://documentation.commvault.com/2022e/expert/45167_qlist_job.html

 

Userlevel 3
Badge +13

Hi @Allan0105 , hope all is well!

You should be able to do all this within a Workflow:

https://documentation.commvault.com/2022e/expert/49663_built_in_activities_for_workflows.html

You can use Decisions to determine if an email is sent out (there’s an Email operation) using the previous jobs as inputs.

Thanks Mike. I am good. hope you are doing good too. 

 

I will just explain, what i was trying to do. we have an BigFix which is used for windows patching. i have created an workflow in commvault which will stop the services , suspend job , disabled schedule etc. which is working fine. 

 

Now i am trying to make BigFix to call our workflow for that i was creating an .bat file in CS which will have a command to execute the workflow, next step is i want to monitor the jobid which workflow created and send back the update to BigFix the status of the job. so i was thinking will put commands on .bat and capture the output of text file which i will use BigFix to capture the output so BigFix will know whether the workflow got completed or not. 

 

Same these things. if we can do with any other method also i am fine. 

@Mike Struening , any luck ? 

Userlevel 7
Badge +23

Read over what @Amey Karandikar sent.  He's one of our developers.

Reply