user13599912 wrote:As mentioned above, consider using dbms_scheduler instead of dbms_job.
I want to call one procedure using DBMA_JOB
which should run every first business day of next quarter.I created a function which gives the first business day of next quarter taking sysdate as input.You can have it run on the first day of the next quarter without a user-defined function, like this:
This assumes your quarters start in Juanary, April, July and October.
interval => 'TRUNC ( ADD_MONTHS (SYSDATE, 3) , 'Q' )'
My question is how do I schedule it in DBMS_JOB such a way that the next_date parameter will display the next business day of next quarter and what should I pass to the interval parameter?You can call a user-defined function the same way you call built-in functions, such as SYSDATE, ADD_MONTHS and TRUNC. Assuming your function returns a DATE, you might use:
interval => 'my_function'