APEX Background Jobs #JoelKallmanDay

Search for a command to run...

No comments yet. Be the first to comment.
Introduction One of the marquee features of APEX 26.1 was AI Interactive Reports. When I started testing this new feature, I was interested to see what was going on behind the scenes. In this post, I

Introduction One of the marquee features of APEX 26.1 is APEX AI Agents. APEX AI Agents allow you to use an LLM and your own PL/SQL and JS tools to perform actions on your data instead of just chattin

Introduction In my previous post, I looked at logging APEX AI Agent requests and responses with Request and Response handlers. Logging is the first step because it shows you what is actually moving th

Introduction Logging is one of the first things you need when building serious AI Agents. Without it, debugging quickly becomes guesswork. You can see the final answer, but not always why the model ch

Context management patterns from building agents in Oracle APEX

I recently watched an excellent presentation by Carsten Czarski from the APEX Development Team on All Things Background. In his presentation, Carsten touched on several DBMS Scheduler jobs which APEX uses to a) Perform Maintenance activities in your APEX environment and b) Launch scheduled processes such as APEX Automations, REST Source Synchronizations, and Page Background Processes.
In this post, I will review these jobs and explain what they do and when they are scheduled to run.
The most interesting jobs for an APEX developer are what Carsten called Scheduler or Co-Ordinator Jobs. These jobs run on a scheduled basis to check if some of your code needs to be run, such as APEX Automations, REST Data Synchronizations, and Background Page Processes.
This job runs every 10 minutes and checks to see if you have scheduled any REST Source Synchronizations to run at that time (or before). If there are any scheduled REST Source Synchronizations, then it runs them.

This job runs every 2 minutes (at 5 seconds past the minute) and checks to see if you have scheduled any APEX Automations to run at that time (or before). If there are any scheduled APEX Automations, then it runs them.

This job runs every 2 minutes (at 45 seconds past the minute) and checks to see if any Background Page Processes need to be run. If there are any, then it runs them.

The table below shows the precise schedule that the Co-Ordinator jobs run on.

What I call Queue Handler jobs are jobs that manage the various queues within your APEX Environment. These include jobs that send out PWA Push Notifications and Emails sent out using the APEX_MAIL API.
This job runs every 2 minutes (at 0 seconds past the minute) and sends out any pending PWA Push Notifications.

This job runs every 5 minutes (at 0 seconds past the minute) and sends out any pending emails.

This job runs on the hour and the half hour and sends out Interactive Report Subscriptions.

This job runs every two minutes and creates requested and approved Workspaces.

This job runs every hour on the hour and sends out emails initiated from APEX Teams Development.


Maintenance jobs are jobs that perform maintenance activities within your APEX environment.
This job purges expired APEX Sessions and runs every hour, on the hour.

This job performs activities such as Archiving Activity Summary, purging REST Source Cache, purging Stale Page/Region Cache, purging Uploaded Files, etc. It runs every day at 1 a.m. database time (usually UTC).
This job gathers aggregated workspace, schema, and instance-level metrics. It runs every day at 2 a.m. database time (usually UTC).

This job caches database dictionary objects related to APEX Workspaces. It runs every day at 1 a.m. database time (usually UTC).
Who knows why?
This job performs backups of your APEX Applications that changed in the previous 24 hours. It runs every day at 2 a.m. database time (usually UTC).

This job deletes APEX Workflow Approval tasks that have been Canceled, Errored, or Completed that are beyond the retention period. It runs every day at 2 a.m. database time (usually UTC). Read more on Workflow Task Retention and purge rules here.


Similar to the previous job, this job is also related to APEX Workflow Tasks. It handles re-processing expired Workflow tasks. The job runs every hour on the hour.

This job handles timing out APEX Workflows that have timed out. It runs every 5 minutes.
This job handles purging completed APEX Workflows. It runs once a day at 3 a.m. This is controlled by the 'Workflow Retention Period Days' setting under Instance Settings.

You can use the following SQL (run as the SYSTEM or SYS user) to get a list of scheduler jobs owned by APEX:
SELECT job_name
, job_action
, repeat_interval
FROM all_scheduler_jobs
WHERE owner = 'APEX_230100'; -- Change based on your APEX Version.
You can also view APEX Jobs from the INTERNAL / Administration Services Workspace by navigating to Monitor Activity > Jobs.

Clicking on a specific job will show details about its individual executions. This can be helpful when tracking down issues.

In later versions of APEX, you can also find APEX job information under Monitor Activity > Administrator Digest > System Schedule Jobs:

Also, don't forget that ORDS has a background job that performs administrative tasks. This job is called ORDS_HOUSEKEEPING_JOB, and it runs from the ORDS_METADATA schema. This job runs every hour on the hour.

I believe that it is important for developers to understand what is happening under the APEX hood. I know that I have learned a lot just by writing this blog post.
๐ฉณ APEX Shorts
๐ APEX Posts