Monday 26 August 2024

Understanding the Difference Between "On Hold" and "On Ice" Statuses in AutoSys

 Understanding the Difference Between "On Hold" and "On Ice" Statuses in AutoSys




autosys

AutoSys is a widely-used job scheduling tool that automates IT tasks and workflows. To effectively manage and control these workflows, AutoSys provides various job statuses that help users monitor and manage job execution. Two such statuses are "On Hold" and "On Ice." While both statuses prevent a job from running, they serve different purposes and have distinct effects on job scheduling. In this article, we will explore the differences between "On Hold" and "On Ice" in AutoSys, how they are used, and when to apply each status.

Overview of Job Statuses in AutoSys

AutoSys jobs can have several statuses, each indicating a specific state of the job's lifecycle. Some of the most common statuses include:

  • Active: The job is currently running.
  • Success: The job has completed successfully.
  • Failure: The job has completed with errors.
  • On Hold: The job is placed on hold and will not run until released.
  • On Ice: The job is placed on ice and will not run until removed from this status.
  • Terminated: The job has been manually stopped.

What Does "On Hold" Mean?

When a job is placed On Hold, it is essentially paused or suspended. This means that the job will not run at its scheduled time, and any dependencies on this job will also be affected. The key characteristics of a job in the "On Hold" status are:

  • Manual Intervention Required: The job will remain on hold until it is manually released by the user. Once released, the job will be eligible to run according to its schedule.
  • Dependencies Affected: Any jobs that are dependent on the "On Hold" job will not run until the hold is released. This can be useful if you want to pause a sequence of jobs temporarily without affecting the overall schedule.
  • No New Schedule: The original schedule of the job remains intact, but the job will not run until released from the hold.

What Does "On Ice" Mean?

The On Ice status is similar to "On Hold" in that it prevents a job from running, but it differs in several important ways:

  • Inactive Status: A job placed "On Ice" is considered inactive and will not run until it is taken off ice. Unlike "On Hold," "On Ice" can affect the job's scheduling behavior.
  • Dependent Jobs Run Normally: Unlike a job on hold, a job that is "On Ice" does not affect the running of dependent jobs. The downstream jobs will still run according to their schedules or conditions as if the "On Ice" job has completed successfully.
  • No Rescheduling: When a job is removed from the "On Ice" status, it does not automatically run, and it will only run at its next scheduled time. This status is typically used for jobs that are not required to run temporarily or are being temporarily deactivated.

Key Differences Between "On Hold" and "On Ice"

  1. Effect on Dependencies:

    • On Hold: Jobs dependent on the "On Hold" job will not run until the hold is released.
    • On Ice: Jobs dependent on the "On Ice" job can run as if the "On Ice" job has succeeded.
  2. Resumption of Job:

    • On Hold: When released, the job will run at the next scheduled time, or immediately if it missed its schedule.
    • On Ice: When taken off ice, the job will only run at its next scheduled time; it does not run immediately unless triggered manually.
  3. Purpose:

    • On Hold: Used to temporarily pause a job and its downstream jobs, often for troubleshooting or delaying execution.
    • On Ice: Used to deactivate a job without affecting the schedule or execution of dependent jobs.
  4. Impact on Job Schedule:

    • On Hold: The job retains its original schedule but will not run until released.
    • On Ice: The job is effectively removed from the active schedule until it is taken off ice.

When to Use "On Hold"

  • Troubleshooting: If you need to pause a job to troubleshoot an issue or to prevent a sequence of jobs from running, placing the job on hold is the appropriate action.
  • Temporary Pause: If you know that a job should not run for a short period (e.g., waiting for a system maintenance window to end), use "On Hold."

When to Use "On Ice"

  • Deactivating Jobs: If a job is no longer required to run temporarily, or you want to deactivate it without affecting other jobs, placing it "On Ice" is the best approach.
  • Maintaining Schedule Integrity: If you want to ensure that dependent jobs run as scheduled even if a particular job should not run, use the "On Ice" status.

How to Set Jobs "On Hold" and "On Ice"

You can change the status of a job to "On Hold" or "On Ice" using the sendevent command in AutoSys:

  • To place a job On Hold:


    sendevent -E JOB_ON_HOLD -J job_name
  • To place a job On Ice:


    sendevent -E JOB_ON_ICE -J job_name
  • To release a job from On Hold:


    sendevent -E JOB_OFF_HOLD -J job_name
  • To remove a job from On Ice:


    sendevent -E JOB_OFF_ICE -J job_name

Conclusion

The "On Hold" and "On Ice" statuses in AutoSys are powerful tools for managing job schedules and workflows. Understanding the differences between them is essential for effective job management. "On Hold" is used to temporarily pause jobs and their dependencies, while "On Ice" is used to deactivate jobs without affecting other jobs in the schedule. By using these statuses appropriately, you can maintain better control over your automated workflows and ensure that your jobs run as intended.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.