Develop > Command-Line Interfaces > opr-jobs Command-Line Interface

opr-jobs Command-Line Interface

You can use the opr-jobs command-line interface (CLI) to restart or list suspended and/or failed deployment jobs. Combined with the Create suspended deployment jobs infrastructure setting, it is recommended to be used for automating the execution of deployment jobs during maintenance time periods.

The opr-jobs CLI activates suspended and restarts the failed deployment jobs by setting their state to PENDING. The job scheduler then adds these deployment jobs to the job queue and deploys them in series.

Location

<OMi_HOME>/opr/bin/opr-jobs.[bat|sh]

Synopsis

opr-jobs -help | -version | -examples | <Connection_INFO> <operation> <targets>

Options

Restrictions

The user running the opr-jobs command-line interface must be an OMi user with the Redeploy All right and full control permission on the Deployment Jobs interface. For more information, see Deployment Jobs and Users, Groups, and Roles.

Non-admin users also need the following file permissions to operate this command-line tool:

File Windows Permissions Linux Permissions
<OMi_HOME>/conf/TopazInfra.ini read r
<OMi_HOME>/log/opr-clis.log full control rw

<OMi_HOME>/log/opr-pgctl.log

Note: This file is not available on gateway server systems.
full control rw
<OMi_HOME>/conf/encryption.properties read r
<OMi_HOME>/conf/seed.properties read r

Examples

  • Restart all possible deployment jobs:

    opr-jobs -user myU -password myPwd -start

  • Restart all failed deployment jobs for Windows nodes:

    opr-jobs -user myU -password myPwd -start failed -query_name All_jobs_for_Windows_nodes

  • Restart all deployment jobs on node1.example.com and node2.example.com:

    opr-jobs -user myU -password myPwd -start -node_list node1.example.com,node2.example.com

  • Restart all suspended deployment jobs on the node group myNodeGrp, which is a member of the top-level group myTopNodeGrp:

    opr-jobs -user myU -password myPwd -start suspended -node_group /myTopNodeGrp/myNodeGrp

    Note that you can specify the path for hierarchical node groups only (the node groups imported from OM for Windows). The node groups imported from OM for UNIX using topology synchronization packages are always flat and are therefore specified by providing their names, for example:

    opr-jobs -user myU -password myPwd -start suspended -node_group myNodeGrp