select distinct s.schedule_id, s.job_id, j.name, s.created_by_role_id, r1.name, s.modified_by_role_id, r2.name, s.created_by_user_id, u1.name, s.modified_by_user_id, u2.name, s.frequency_type_id,
s.once_date_time, s.next_run_time, s.scheduler_lock_id
FROM schedule s
INNER JOIN job j on s.job_id = j.job_id
INNER JOIN blrole r1 on r1.role_id = s.created_by_role_id
INNER JOIN blrole r2 on r2.role_id = s.modified_by_role_id
INNER JOIN bluser u1 on u1.user_id = s.created_by_user_id
INNER JOIN bluser u2 on u2.user_id = s.modified_by_user_id
WHERE s.next_run_time is not null
and s.next_run_time >= (SYSDATE - interval '2' hour)
and s.next_run_time <= SYSDATE
and s.is_deleted = 0
and j.object_type_id != 7036
and j.is_deleted = 0
and j.is_latest_version = 1 ;