Does anyone know if it’s possible to schedule a Task between particular times? I’m looking to scheduled a task daily to run every two minutes but only between 6am and 8pm each day.
Any PL/SQL assistance would be appreciated.
Many thanks.
Does anyone know if it’s possible to schedule a Task between particular times? I’m looking to scheduled a task daily to run every two minutes but only between 6am and 8pm each day.
Any PL/SQL assistance would be appreciated.
Many thanks.
Try this:
decode(sign(sysdate - (trunc(sysdate) + 20/24)), 1, (trunc(sysdate) + 6/24), (sysdate + 2/1440))
Well it didn’t growl at me for wrong syntax. I’ll let you know after 8pm today if it works!
Many thanks,
Linda
Check after 08:02pm instead - as depending on when the penultimate task was executed in the queue, it could execute the last task slightly after 8pm!
I find the DMBS Scheduler syntax is easier to read e.g.
FREQ=MINUTELY; BYHOUR=6,7,8,9,10,11,12,13,14,15,16,17,18,19,20;INTERVAL=2;
I find the DMBS Scheduler syntax is easier to read e.g.
FREQ=MINUTELY; BYHOUR=6,7,8,9,10,11,12,13,14,15,16,17,18,19,20;INTERVAL=2;
Not sure what you mean by this,
Check after 08:02pm instead - as depending on when the penultimate task was executed in the queue, it could execute the last task slightly after 8pm!
Sadly, this didn’t work,
I find the DMBS Scheduler syntax is easier to read e.g.
FREQ=MINUTELY; BYHOUR=6,7,8,9,10,11,12,13,14,15,16,17,18,19,20;INTERVAL=2;
Not sure what you mean by this,
It’s a different format you can put into the ‘Custom Expression’ field. It will run every 2 minutes between 6am and 8pm (20).
FREQ: How often?
INTERVAL: Related to FREQ, minutely = 2 e.g. every 2 minutes
BYHOUR: which hours of the day?
Just to fix my code…
decode(sign(sysdate - (trunc(sysdate) + 6/24)), 1, decode(sign(sysdate - (trunc(sysdate) + 20/24)), -1, (sysdate + 2/1440), (trunc(sysdate+1) + 6/24)), (trunc(sysdate) + 6/24))
--If the time is greater than 06:00 then
--If the time is less than 20:00 then
--2 minute interval
--else set start time to 06:00 the following day
--else set start time to 06:00
But I prefer the answer from
I find the DMBS Scheduler syntax is easier to read e.g.
FREQ=MINUTELY; BYHOUR=6,7,8,9,10,11,12,13,14,15,16,17,18,19,20;INTERVAL=2;
I’m happy to report,
I now have the moral quandary of which of your responses to mark as Best Answer. As I think we agree
Many thanks both, appreciate your input
Linda
I’m happy to report,
I now have the moral quandary of which of your responses to mark as Best Answer. As I think we agree
Many thanks both, appreciate your input
Linda
No worries, the most important thing is that you found a solution!
I find the DMBS Scheduler syntax is easier to read e.g.
FREQ=MINUTELY; BYHOUR=6,7,8,9,10,11,12,13,14,15,16,17,18,19,20;INTERVAL=2;
Not sure what you mean by this,
It’s a different format you can put into the ‘Custom Expression’ field. It will run every 2 minutes between 6am and 8pm (20).
FREQ: How often?
INTERVAL: Related to FREQ, minutely = 2 e.g. every 2 minutes
BYHOUR: which hours of the day?
IFS8: I tried this syntax AS IS and i am getting syntax error… what could have gone wrong here…
Once this error will resolve i will fix it hourly for only weekdays hopefully easily.
Try:
FREQ=HOURLY;BYDAY=MON,TUE,WED,THU,FRI;BYMINUTE=0;BYSECOND=0;INTERVAL=1;
Every hour - on the hour Monday to Friday
What version of Oracle are you using for apps 8?
Aaah
I wanted similar thing for generating event based pm work orders for irregular intervals in Apps 10
Scenario:
As per IFS Documentation, below is advised -
Hello google -
Link - https://docs.oracle.com/cd/E11882_01/server.112/e25494/scheduse.htm#ADMIN034
Here you can find lot expressions of use.
Cheers
Regards,
Srinivas
Thanks everyone for including their thoughts over here. It helped me out trying to get a scheduled task to run every last Saturday of a month at 10:30 am. This is the setting I've used:
FREQ=MONTHLY; BYDAY=SAT; BYSETPOS=-1; BYHOUR=10; BYMINUTE=30;
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.