Solved

qoperation jobcontrol commandline

  • 21 January 2022
  • 11 replies
  • 184 views

Userlevel 2
Badge +7

Hi All,

i searching for an option for the command for the “qoperation jobcontrol” .

I try to set a suspend with auto resume interval option and i can’t find it in the command line documentation.

in the GUI it’s possible and i hope it’s available in command line.

Kind regards,

icon

Best answer by Mike Struening 24 January 2022, 17:45

View original

If you have a question or comment, please create a topic

11 replies

Userlevel 7
Badge +23

@christophe , I’ll look into this and see if were is an option here, or elsewhere.

Sharing the doc link for anyone following along:

https://documentation.commvault.com/11.26/expert/45282_qoperation_jobcontrol.html

Userlevel 7
Badge +23

@christophe , I did find the option via REST API:

https://documentation.commvault.com/commvault/v11_sp16/article?p=47664.htm

Let me know if this works for you!

Userlevel 2
Badge +7

@christophe , I did find the option via REST API:

https://documentation.commvault.com/commvault/v11_sp16/article?p=47664.htm

Let me know if this works for you!

Hi Mike,

thanks for your reply. My needs is to create a script to suspend all jobs and services in order to reboot the commserve server after windows update.

So in command line i notice that the autoresume option is not available. But in the rest API syntax, i found the “POST MultiJob Operation” who has a option “JOB_SUSPEND_AUTORESUME” but i need to provide jobid’s. there is a option to include all running jobs ?

regards,

 

Userlevel 1
Badge +1

hi Chritophe,

 you can use “qlist job” or API relevant command. I don't like that command list just basic information.

Filip

Userlevel 2
Badge +7

hi Chritophe,

 you can use “qlist job” or API relevant command. I don't like that command list just basic information.

Filip

Hi Filip,

thanks, but yes i can use it but i don’t want to use several API only to obtain the -all equivalent command line. 

Userlevel 7
Badge +23

@christophe , as best as I can tell, the REST API option is the only option.

It’s also a much more powerful overall toolset as well.

Is your concern about mixing up APIs?  Regarding specifying job IDs, let me see if there’s a switch to just cover all running job IDs.

Badge +2

@christophe

You can use following command to suspend all jobs.

QOperation.exe execute -af C:\JobControlXML

We need to save following xml in  C:\JobControlXML

<JobManager_PerformMultiCellJobOpReq message="0">
<processinginstructioninfo>
 <user _type_="13" userId="1" userName="admin"/>
 <locale _type_="66" localeId="0"/>
 </processinginstructioninfo>
 <jobOpReq operationType="0"/>
<assoc>
 <entity _type_="0"/>
 </assoc>
 </JobManager_PerformMultiCellJobOpReq>

 

If you want to do get the functionality to suspend and auto resume then below XML should be used.

<JobManager_PerformMultiCellJobOpReq message="0">
<processinginstructioninfo>
 <user _type_="13" userId="1" userName="admin"/>
 <locale _type_="66" localeId="0"/>
 </processinginstructioninfo>
<jobOpReq operationType="6" autoResumeInSec="1200"/>
<assoc>
 <entity _type_="0"/>
 </assoc>
 </JobManager_PerformMultiCellJobOpReq>

Userlevel 2
Badge +7

@christophe

You can use following command to suspend all jobs.

QOperation.exe execute -af C:\JobControlXML

We need to save following xml in  C:\JobControlXML

<JobManager_PerformMultiCellJobOpReq message="0">
<processinginstructioninfo>
 <user _type_="13" userId="1" userName="admin"/>
 <locale _type_="66" localeId="0"/>
 </processinginstructioninfo>
 <jobOpReq operationType="0"/>
<assoc>
 <entity _type_="0"/>
 </assoc>
 </JobManager_PerformMultiCellJobOpReq>

 

If you want to do get the functionality to suspend and auto resume then below XML should be used.

<JobManager_PerformMultiCellJobOpReq message="0">
<processinginstructioninfo>
 <user _type_="13" userId="1" userName="admin"/>
 <locale _type_="66" localeId="0"/>
 </processinginstructioninfo>
<jobOpReq operationType="6" autoResumeInSec="1200"/>
<assoc>
 <entity _type_="0"/>
 </assoc>
 </JobManager_PerformMultiCellJobOpReq>

 

Hi,

thanks it’s what i needed. i have a strange behavior, even if i do a qlogin with the admin user i obtain the error “user not logged in”

 

 

Badge +2

Welcome. Please let us know the FR.

Hemant

Userlevel 2
Badge +7

Hi Mishra,

i have used the second xml file to do a autoresume and it don’t do the resume after the given time (i have set 2min).

regards,

Badge +2

I will get it checked. As a workaround we can use 2 XMLs. First one to suspend all jobs and second one to resume all jobs.

 

<JobManager_PerformMultiCellJobOpReq message="0">
<processinginstructioninfo>
 <user _type_="13" userId="1" userName="admin"/>
 <locale _type_="66" localeId="0"/>
 </processinginstructioninfo>
 <jobOpReq operationType="0"/>
<assoc>
 <entity _type_="0"/>
 </assoc>
 </JobManager_PerformMultiCellJobOpReq>

<JobManager_PerformMultiCellJobOpReq message="0">
<processinginstructioninfo>
 <user _type_="13" userId="1" userName="admin"/>
 <locale _type_="66" localeId="0"/>
 </processinginstructioninfo>
 <jobOpReq operationType="2"/>
<assoc>
 <entity _type_="0"/>
 </assoc>
 </JobManager_PerformMultiCellJobOpReq>