Sorting of Scheduled Run Times for DBMS_SCHEDULER jobs

Toad for Oracle Base Edition (64-bit)
Add-Ons: DB Admin Module
17.1.717.3711

I notice the sorting of the Scheduled Run Times for DBMS_SCHEDULER jobs seems to be using the character representation of the times rather than the actual date/time value. Not a big deal, but I have to look out for it (and explain it to others, which is the worst part :wink:).

e.g. 01-05 AM displays before 12 AM on the same day

RunTime
02/01/2025 10:00:00.548501000 PM -05:00
02/01/2025 11:00:00.548501000 PM -05:00
02/02/2025 01:00:00.548501000 AM -05:00
02/02/2025 02:00:00.548501000 AM -05:00
02/02/2025 03:00:00.548501000 AM -05:00
02/02/2025 04:00:00.548501000 AM -05:00
02/02/2025 05:00:00.548501000 AM -05:00
02/02/2025 12:00:00.548501000 AM -05:00
02/08/2025 10:00:00.548501000 PM -05:00
02/08/2025 11:00:00.548501000 PM -05:00
02/09/2025 01:00:00.548501000 AM -05:00
02/09/2025 02:00:00.548501000 AM -05:00
02/09/2025 03:00:00.548501000 AM -05:00
02/09/2025 04:00:00.548501000 AM -05:00
02/09/2025 05:00:00.548501000 AM -05:00
02/09/2025 12:00:00.548501000 AM -05:00
02/15/2025 10:00:00.548501000 PM -05:00
02/15/2025 11:00:00.548501000 PM -05:00
02/16/2025 01:00:00.548501000 AM -05:00
02/16/2025 02:00:00.548501000 AM -05:00
02/16/2025 03:00:00.548501000 AM -05:00
02/16/2025 04:00:00.548501000 AM -05:00
02/16/2025 05:00:00.548501000 AM -05:00
02/16/2025 12:00:00.548501000 AM -05:00
...

My test script with real names changed. Would need to create MY_TEST_JOB first

-- Set to DST-aware time zone
ALTER SESSION SET TIME_ZONE = 'US/Eastern'
/
SELECT SESSIONTIMEZONE FROM DUAL
/

-- Create schedule for Saturday 10,11 PM runs
BEGIN
SYS.DBMS_SCHEDULER.CREATE_SCHEDULE
(
schedule_name => 'RUNTIMES_SATURDAYS'
,repeat_interval => 'FREQ=DAILY;BYDAY=SAT;BYHOUR=22,23;BYMINUTE=0;BYSECOND=0'
,end_date => NULL
);
END;
/

-- Create schedule for Sunday 12-5 AM runs
BEGIN
SYS.DBMS_SCHEDULER.CREATE_SCHEDULE
(
schedule_name => 'RUNTIMES_SUNDAYS'
,repeat_interval => 'FREQ=DAILY;BYDAY=SUN;BYHOUR=0,1,2,3,4,5;BYMINUTE=0;BYSECOND=0'
,end_date => NULL
);
END;
/

--Update the the job schedule (assuming MY_TEST_JOB already exists)
BEGIN
DBMS_SCHEDULER.set_attribute( name => 'MY_TEST_JOB',
attribute => 'repeat_interval',
VALUE => 'RUNTIMES_SATURDAYS,RUNTIMES_SUNDAYS'
);
END;
/

I assume you are talking about the grid in Schema Browser -> Scheduler Jobs -> RHS -> Scheduled Run Times.

I'll log this to be fixed, but....

They are fetched from the database in the correct order. So if you don't click the column header to sort, they should be in the correct order. If you previously clicked the column header, you can CTRL+Click it to remove the sort. You may have to refresh the data to get the correct order at that point.

1 Like

If you previously clicked the column header, you can CTRL+Click it to remove the sort. You may have to refresh the data to get the correct order at that point.

Yes it does! Thanks for the tip!