Gain precise control over job reruns with the new deterministic rerun counter
Effortlessly track which iteration is running for your integrations by exposing a deterministic rerun counter directly as a consumable variable.
Streamline your troubleshooting and runtime script execution! You can now
effortlessly track exactly which iteration is running for your integrations. By exposing
a new, deterministic rerun counter directly as a consumable variable, your job payloads
and downstream diagnostics can instantly recognize whether a job is on its first rerun,
second rerun, or beyond. You can use the ${this.rerurncount} or
${job.<JOBNAME>.rerurncount} syntax.
With this powerful new tracking capability, you can take advantage of:
- Targeted execution tracking
- The
reruncountvariable is intelligently designed to track only reruns. Your initial job submission remains clean and unaffected, while the very first rerun automatically registers as attempt number one—incrementing sequentially for every subsequent run. - Dynamic script adaptation
- Smoothly add the rerun counter into your job payloads or runtime expressions
using standard variable substitution (for example,
${job.<jobname>.reruncount}). This empowers your scripts to adapt their logic on the fly based on the specific rerun attempt. - Secure and ready to use
- Enjoy immediate, enhanced visibility in your persisted job properties and metadata. Because the counter is treated as non-sensitive metadata, you benefit from improved downstream diagnostics and maintainability without needing to alter your existing authorization checks or introduce new security paths.
You can use this variable to define the actions to be taken by subsequent jobs based on the number of reruns: for example, you can decide to run job stream A if the rerun counter reaches 5 reruns, or run job stream B if the rerun counter indicates 10 reruns.
For more information, see Passing job properties from one job to another in the same job stream instance,