I want to create an Oracle DBMS Job that runs every week day (not on weekends) from 09:00 to 20:00 every 10 min. I wonder if I can do that in the FREQ
parameter of the job definition or I have to create a New Maintenance Window
.
It seems that with the solution proposed, the job runs at 9 and 20 only, and after first execution, when I run this query
select owner, job_name, next_run_date
from dba_scheduler_jobs
where JOB_NAME = 'GET_INVOICES_JOB';
I got 09/10/17 20:01:27,000000000 EUROPE/MADRID
'freq=minutely; interval=10; byhour=9,20; byday=MON,TUE,WED,THU,FRI; exclude=Company_Holidays; bysetpos=-1'
You may use this:
When this scheduler in charge I get the results below :
Where :
I don't think this is possible:
Here are some repeat_interval examples that demonstrate the versatility and flexibility of the calendaring syntax:
Run at 10:00 pm daily from Monday to Friday:
Run every hour:
Run every 5 minutes:
Run every Friday at 9:00 am (All three examples are equivalent):
Run every other Friday:
Run on Monday of weeks 5, 10 and 15 every year:
Run on the last day of every month.
Run on the next to last day of every month:
Run on March 10th (Both examples are equivalent):
Run every January 10, 11, 12, 13 and 14 (Both examples are equivalent):
Run every 10 days:
Run daily at 4:15, 5:15, and 6:15PM:
Run on the 15th day of every other month:
Run on the 29th day of every month:
Run on the second Wednesday of each month:
Run on the last Friday of the year:
Run every 50 hours:
Run on the last day of every other month:
Run hourly for the first three days of every month:
Run on the 60th, 120th and 180th days of the year:
Run on the last workday of every month (assuming that workdays are Monday through Friday):
Here are some more complex examples which reference the following named schedules:
Run on the last workday of every month, excluding company holidays: FREQ=MONTHLY; BYDAY=MON,TUE,WED,THU,FRI; EXCLUDE=COMPANY_HOLIDAYS; BYSETPOS=-1
Run at noon every Friday and on company holidays: FREQ=YEARLY; BYDAY=FRI;BYHOUR=12; INCLUDE=COMPANY_HOLIDAYS
Run on these three holidays: July 4th, Memorial Day, and Labor Day: JUL4,MEM,LAB
Run on the last day of the month that is either a Saturday or last day of a quarter:
Run on the last Wednesday of every quarter of the fiscal year:
Run on the last work day of the 2nd and 4th quarters of the fiscal year (assuming that workdays are Monday through Friday):