1 Reply Latest reply on Aug 3, 2016 2:37 PM by Cheng Fang

    Start job in specific step running standalone

    Richard Moore Master

      We are using our Corporate job scheduler to start JBeret jobs (standalone). There will be times when a job may fail in say step 2, the on-call developer resolves the problem but needs to have the job restarted in step 3. Can we start a job in a specific step?

        • 1. Re: Start job in specific step running standalone
          Cheng Fang Master

          you can restart from step2 (where it failed), and design your step2 to skip some processing during restart, depending on current application state, or job parameters passed when invoking restart.

           

          There is a way to tell restart to restart from a specific step, if your previous job execution was stopped.  If you look at job.xml.xsd schema, the stop element has a restart attribute that tells which step to restart from.  Your can design your step2 to stop upon certain error condition (instead of failing) so you can provide a restart value.

           

          <step id="stepE">
            <batchlet ref="batchlet1">
          ...
            </batchlet>
            <stop on="match on this exit status" exit-status="set the new exit status" restart="stepB"/>
          </step>