How to create a schedule with condition to run in Oracle

61 Views Asked by At

I need create a job schedule. My job must be run after table sources from DWH team run are done, but I can't control this. I only can see table_name and complete_run_date_time in a log table from DWH team.

So please guide me on how to create a job to run my procedure when complete_run_date_time = sysdate.

I tried using If Then Else, but it can not run.

1

There are 1 best solutions below

0
Justin Cave On

Ideally, whatever job scheduler is responsible for loading the data warehouse would spawn your job after completion. Barring that, I'd just set the job to run every, say, 5 minutes. If trunc(complete_run_date_time) = trunc(sysdate) and your process hasn't run yet today (you may need a new local log table), then run your process.