Finding if a group of possible times falls within another range. - time

So I have a task which requires me to find when a certain order runs through a set period of time.
E.g. Task runs 10:30 - 13:30 and the range of times I am interested in is 11:00 to 12:30 - how do I highlight when said task runs through this time?
I can do the obvious whereby if the task finishes between 11:00 and 12:30, the cell is highlighted. But I am struggling with how to select this when the start is before the time range and the finish is after.
Any suggestions on how to get started are greatly appreciated?
Thank You

If you are using sql you could use these queries:
http://salman-w.blogspot.nl/2012/06/sql-query-overlapping-date-ranges.html

Related

How to make scheduler which will run process only at working days?

I'm working with Informatica(ETL). I want that scheduler run processes only at working days (it's not always from Monday till Friday).
For example, we have not working days from 31-DEC-2020 till 10-JAN-2021. Or 20-FEB-2021 is working day but 22-FEB-2021 AND 23-FEB-2021 are holidays.
I can generate file with not working days or only working days. Can informatica scheduler read this file(or smt else) to run processes only at working days? Any ideas how to solve this problem?
Now I have on Oracle db table with working and not working days.
Easiest would be
create a session which will read form work-day file/table and compare with sysdate. And produce 1 row if match found else 0.
Then other sessions after first one - if previous row output is =1 then proceed else dont do anything.
So basically first session will ensure if its a workday, session will proceed else it will stop.

Single Schedule Multiple entry in ODI

I am scheduling in mapping. This is steps i have taken.
create a scenario of the mapping
2.Create schedule of the scenario.
i. in Definition-
a. Context: Global
b. Log Level: 5
c. Status: Active
ii. Execution style-
a. Repetition: Many Times, Interval between repetition: 1 minutes
Now, when i go to schedule window of Agent, i see two schedule active for the same mapping. Why?. Isn't there should be only one schedule here.
I see only one schedule in agent only if do the changes on Definition and keep Execution style empty.
Tool: ODI 12c
Images: Issue images
You can see in the third part of your picture, in Schedule, that on the column Start time, the time is different for the two lines. There you can see all your runnings.
So, you don't have two schedule, but one that was run two times in the same day.

Scheduling Monthly job using oozie coordinator

Can you please help me with, what can be used to for scheduling an oozie coordinator job to execute on first Monday of every month.
I know we have a frequency parameter that can be set as ${coord:months(1)} . But this will not allow me to schedule the jobs on a particular day of a particular week of a month. Hope I am not complicating the question here.
Any help is strongly appreciated.
Thanks,
Syed
You unfortunately cannot schedule in the specific manner you are looking for. As you already note, you can run on a monthly basis - i.e. the 5th day of each month, but you are not be able to control the Day of the Week other than for the first materialization.
A possible work around this would be to run your coordinator on a weekly basis, to materialize on the Monday and then have a custom Java Action as your first step in the workflow that will throw an exception if it's not the first day of the month.
A downside of this approach is that you'll see 4 or so failures per month in the job list for the coordinator, but at least it will give you the behaviour you're looking for.

Oracle Scheduler - can a single job be both event based and time based

Hi I am new to Oracle Scheduler. My question is - Can we give both repeat interval and event condition in the Schedule object for a single job?
I have this requirement in job scheduling - A job should run at a scheduled time, but only if a certain event has occured.
For eg.
Job1 should run
- at 10 am every day
- but only if same job from yesterday is not running anymore. (This I gonna figure out based on the table entry.) So the event gonna be a cell entry say 'ENDED' in the table job_statuses.
Would be easier if I can give both info in the same job. Else another approach I gonna try is - Schedule the job based on time. If the earlier instance is still running , reschedule the job based on event. But this looks clumsy.
Thanks in advance.
Mayank
I'd encode the condition in the PL/SQL of the procedure itself. i.e. it runs at 10am every day, but the first thing it does is check if the previous job had finished successfully.
What you could do is create 3 jobs
EVENT_JOB
REPEAT_JOB
ACTUAL_WORK_JOB
EVENT_JOB and REPEAT_JOB just start ACTUAL_WORK_JOB. If that is already - or still - running, you get an error on which you can react accordingly.

PLSQL program should run on any day between 1 and 5 of every month and between 25 and last day month

I have a PLSQL program with three cursors. This program should run as a job.
The job should run on any day between 1st and 5th of every month. And also between 25th and last day of every month. How to write a logic to run this program?
I would set a database job to run every day and then make a simple if clause at the start of the program to check if it's valid day to run the rest of the code.
Check out the DBMS_SCHEDULER routines.
The new version (v3) of Oracle's SQL Developer has a nice GUI for setting up schedules

Resources