On April 23, 2025, OS Management reaches end of life (EOL). Effective now, the service is no longer available to you in regions where you are not already using OS Management, or to new users with new tenancies. Before the EOL date, we recommend that you migrate your managed instances to the OS Management Hub service. If you are an Oracle Autonomous Linux user, see Important Maintenance Event. For more information, see the Service Change Announcement.

Managing Scheduled Jobs and Work Requests

Describes how to manage OS Management scheduled jobs and work requests.

Scheduled Jobs

When you use the OS Management service to manage updates on a managed instance or managed instance group, you have full control over when actions takes place.

If you specify that an action take place immediately, the OS Management service creates a work request.

If you specify that an action is to take place at a particular date and time, the OS Management service creates a scheduled job. There are two basic modes for scheduled jobs:

  • A scheduled job in which the job executes once.

    You can schedule one-time jobs for tasks such as installing an update or a set of updates. These tasks represent activities that are specific to a one-time event. For example, you can schedule a one-time job installing a specific package version, like Python, to support an application. When scheduling these actions, you have the option to perform the action immediately or to choose a Custom Schedule where you can select the Date and Time on which to schedule a one-time job.

  • A scheduled job in which the job recurs at a specified interval.

    You can schedule recurring jobs for tasks such as installing all available updates for a managed instance group. For example, you can schedule a job to install all security updates every week at a certain time. When scheduling these actions, you have the option to perform the action immediately or to choose a Custom Schedule where you can select the Date and Time to initially run the job and then optionally set the job to Repeat at a specified interval (Hourly, Daily, Weekly, or Monthly).

When the scheduled date and time are reached, one or more work requests are created to perform the action. You have full control over scheduled jobs, to run them immediately, to delete them, or to skip a recurring job. The OS Management service maintains a complete history of scheduled jobs and their associated work requests.

Note

For more information about tasks that support scheduled jobs, see Managing Linux Packages and Managing Windows Updates.

Work Requests

Actions such as installing or removing updates are asynchronous and initiate work requests. You can use the work request to track the status of these operations, including the ability to see why an action failed. The OS Management service maintains a complete history of work requests on managed instances or managed instance groups.

Work Request States

The work request states are:

Accepted
The request is in the work request queue to be processed.
In Progress
The work request is being processed.
Succeeded
The work request has been processed successfully.
Failed
The work request has not been processed successfully. You can look at the work request logs to identify the issues, and then troubleshoot it.
Canceling
The work request is being canceled.
Canceled
The work request has been canceled.
Note

The OS Management service cleans up work requests that are older than 2 weeks, which have completed successfully or failed. Any work request that has not started or is in progress is not cleaned up.

Using the Console

Using the API

For information about using the API and signing requests, see REST APIs and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.

Scheduled Jobs

Use these API operations for working with scheduled jobs:

Work Requests

Use these API operations for analyzing work requests:

For a full list of API operations available for the OS Management service, see OS Management API.

Using the Python SDK to Generate Compliance Reports

This section shows how to run a security compliance report using an example Python script (compliance_report.py) that leverages the OS Management APIs. The example Python script generates a security compliance report, either across a tenancy or per compartment, for all managed instances that are missing security updates.

Note

The Python SDK enables you to write code to manage Oracle Cloud Infrastructure resources. For more information, see Python SDK.
Tip

For a video demonstration showing how to run a security compliance report, see Video: Create a compliance report for Linux instances.