Implementation of complex Time window

Hi all,
I want to allow script to run a particular day. Let's have this example to illustrate:
     - jobs are scheduled in the night of the last workday of the month to the day after
     - script S has to be executed the day after last workday of the month (past midnight)
How is it possible to implement that with TimeWindows?
First, I thought that it'd possible to use multiple time intervals to get a combination that satisfied my need:
     - Time interval for the last workday from 8pm till midnight
     - first workday from midnight to 7am
     - first saturday from midnight to 7am (in case, the last workday is a friday)
But using this method allow the script to run at unexcepted times.
Then, I saw the period functions "Last workday in month [-x] [to last workday in month [-y]]" that sounds good but :
     - period is only during a particular month, cannot be extended to the first worday of the next month
     - there is only functions for last workday but nothing for first ones
I think it would be possible to implement myself the period functions needed, but Oracle functions cannot be exported with our current import/export tool.
Finally I have no idea how to implement that. Have you any clue?
Thanks in advance.
Regards,
Yi Jiang

Hi Anton,
Thanks for your answer.
It's a chain. But it is not necessairly scheduled before midnight.
And yes there are functions for first/second workday in the month but it's only on the current month and not thoughout following months.
Another yes. the day after the last workday is not necessarily the first workday of the next month, but when it is the case, I cannot see any solution with the time windows implementation.
So I finally got the following solution: using the precondition that check the TW to compare it with:
- the current timestamp (starttime for ex) if it's before midnight
- the current timestamp (starttime for ex) - 12 hours if it's midnight past
Then, TW are defined as the scripts were launched before midnight in all case.
Regards
Yi Jiang

Similar Messages

  • Odd and even years with Time Windows?

    Hi All,
    Does anybody know how to implement a time window for even years / ode years?
    For example, a script A that needs to be executed every 1st January of even years and a script B that needs to be executed every 1st January of odd years.
    At last, it possible to :
    - specify hard coded dates in TW for these scripts,
    - use particular pre conditions (which script from A or B has to be executed) with a common yearly TW
    but better solutions are welcome
    Thanks a lot.
    Regards,
    Yi Jiang

    Hi Yi,
    If you need this for only one case, I'd go for the one-off setup of specific dates.
    If you have multiple cases, a simple way to achieve your goal is the following set of time windows:
    - TW_EVEN_YEARS: from 1-1-2010 to 31-12-2010, 1-1-2012 to 31-12-2012, 1-1-2014 to 31-12-2014, ...
    - TW_ODD_YEARS:  from 1-1-2009 to 31-12-2009, 1-1-2011 to 31-12-2011, 1-1-2013 to 31-12-2013, ...
    and then
    - TW_DAY1_EVEN_YEARS: day 1 enabled during TW_EVEN_YEARS
    - TW_DAY1_ODD_YEARS: day 1 enabled during TW_ODD_YEARS
    - TW_LAST_FRIDAY_EVEN_YEARS: last friday enabled during TW_EVEN_YEARS
    - TW_LAST_FRIDAY_ODD_YEARS: last friday enabled during TW_ODD_YEARS
    etc.
    This way, you do not need to specify the dates for each case, only once.
    Regards,
    Anton.

  • Non standard time windows

    Hi All,
    I am wondering about the best way to implement some non standard TW like biweekly frequency.
    In this case (biweekly), I think I can create a TW with 2 different TW intervals, one for the first 15 days and another for the remaining 15 days.
    What is your point of view ?
    Regards,
    Yi Jiang

    Hi Yi,
    In principle submit frames define the frequency of the job and time windows define the allowed start times.
    However if you have a somewhat irregular time window, then of course both objects (submit frame & time window) come into play.
    For the simple scenario, an exact biweekly schedule, I'd create a submit frame of "every 14 days" and then plan jobs using this submit frame and optionally a time window (for instance to fix the starttime of the process, or to use the "fit in time window" property).
    If the process is not entirely biweekly, but almost, f.i. 1st of the month & 15th of the month, then yes, a time window with two elements (one for each of the options) is the easiest. The submit frame should then be shorter than or equal to the shortest gap in the time window, in this example you could take two weeks (that would work out just right even in February with 28 days).
    Regards,
    Anton.

  • Can I use the the measured time between the first count and the last count in a fixed time window in order to increase the accuracy of a quadrature velocity measurement?

    I am measuring velocity using a linear encoder. Resolution is 40microns, sample frequency is 1MHz and the real velocity is oscillatory in nature with an amplitude of 200 to 400 mm/s with a freq of about 1Hz. We use a 5ms fixed time window to measure velocity. The quanization error for this is 8mm/s. Can I get rid of the quatization error by somehow measuring the exact time from the first pulse to the last pulse in the measurement window?

    There is probably a way to do it, but it it may be easier to use an X-series board for the job.   They support a new counter capability for count reset on a digital edge without needing to be configured in encoder position mode.  I am not sure exactly how that feature's been implemented however, so maybe it won't make things easier after all.
    The plan based on the hoped-for behavior: 
    1. Configure an X-series counter for pulse generation based on "ticks" of your clock channel.
    2. Set both initial delay and low time to the critical # of ticks.
    3. Configure for count reset on a digital edge (if possible in pulse generation mode)
    4. Configure the count reset value to be the critical # (or possibly 1 less, if possible in pulse generation mode)
    5. If you want the output to remain high indefinitely, configure the counter task to use its own output as a
    pause trigger, and pause while high.
    The way pulse generation works is to preload a # of "low time" ticks into the count register.  Then every source edge will decrement the count.  When the count reaches terminal count (0), the counter's output is toggled (or can be configured to pulse).  The register is then loaded with the # of "high time" ticks and the process continues.
    You would be perpetually interrupting the count-down process as long as you got your triggers in time.  The count would keep getting reset to the # of low counts, keep decrementing toward 0 without reaching it, and so on.  If ever you did reach 0, the output state would toggle high, then the high state would prevent subsequent clock signals from decrementing the count.
    You can conceivably do a similar thing with a 6601, but I'm pretty sure you'd need 2 counters working together to get it working.
    -Kevin P

  • How to implement 24 Hours Time Clock?

    Hello All,
    We have a requirement to implement 24 hours time clock. with the text box and up and down arrows to increase the hour/minute/second. Much similar to windows time setting appears below the clock when you double click the time shown in windows startup bar.
    Could you please tell me any pointer, to implement this behaviour in OA framework.
    Thanks

    Hi,
    yup thats redundant, actually this is what i tried:
    Co code(process request)
    OARawTextBean xx = (OARawTextBean)webBean.findChildRecursive("item1");
    String ij="<script type=\"text/javascript\" src=\"/OA_HTML/muk.js\">"+"</script>"+"<script language=\"javascript\">"+" Clock(); "+" </script>";
    System.out.println(ij);
    xx.setValue(pageContext,ij);
    Content of muk.js
    var dateform
    speed=1000
    len=28
    tid = 0;
    function dodate()
    f.date.value=new Date();
    tid=window.setTimeout("dodate()",speed);
    function start(x) {
    f=x
    tid=window.setTimeout("dodate()",speed);
    // for some reason on some pages this crashes netscape
    function Clock()
    document.write('<FORM name=dateform><input name=date size=')
    document.write(len)
    document.write(' value="Clock: Requires Javascript"></FORM>')
    start(document.dateform);
    But clock is not getting started! It gives some error in f.date.value, on normal html page it works fine. You can copy paste my previous java script in a plain html file and check. i don't get y on a oaf page its giving error !
    Lets see what gurus in java script and oaf present here can say....!
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to schedule a job to run only in a  time window

    Hi,
    I need to schedule a job to run every day but sundays from 7am to 6pm. I managed to get it to start at seven like this
    FREQ=WEEKLY;BYDAY=TUE,WED,THU,FRI,SAT;BYHOUR=7;BYMINUTE=0;BYSECOND=0
    how can I set the job to stop at 6pm?
    thanks in advance

    Yes, as far as I could tell you create a resource plan to allocate processor resources, assign a resource plan to the window, then assign the job to a job class which is in turn assigned a resource group within that resource plan. Then when the window is active, it sets the active resource plan for the database so the job will run using this until the window deacivates the resource plan. Unfortunately because the resource plan is database wide, it means you could only really have one time window active at any one time within which to run jobs, I don't think two windows could overlap.
    Easier to work within jobs, but its a shame the job doesn't end itself, rather than having to have the second job, although the second job does enable you to engage in some communication between jobs to cleanly end it, rather than stop it dead. I have a job that runs until a set time each day, but it just works on a loop that sleeps for a few minutes each time, checking for file arrival and processing it, and sending a notification e-mail if it reaches its end time without the file arriving.

  • How can I implement a real time datawarehouse

    Hi, I'm a little lost here but I want to know how can I implement a real time datawarehouse in sql server, I don't know if it is only to make the extraction process the shortest time possible.
    Thank you

    Hi Mega15, 
    I agree with everything Seif and Louw said, but I'd like to add that if you are using SQL Server 2012 or 2014 and you want to use DirectQuery or ROLAP mode (depending on what SSAS mode are you using, tabular or multidimensional) you may be interested on
    using columnar indexes on your base tables. 
    Analytical and aggregated queries will take GREAT advantage from these indexes, they will perform much better than with traditional B-Tree indexes in most of your scenarios. 
    Regards. 
    Pau.

  • I have a ipod nano 1st and 2nd generation and am trying to put music on it but every time windows says one of the usb devices attached to this computer has malufunctioned and windows does not recognize it code 43 can someone help me please

    i have a ipod nano 1st and 2nd generation and am trying to put music on it but every time windows says one of the usb devices attached to this computer has malufunctioned and windows does not recognize it code 43 can someone help me please

    Try putting it into "Disk Mode" http://docs.info.apple.com/article.html?artnum=93651
    Then with it in this mode connect it to the PC and try to run the latest iPod updater to do a restore and update software if you have the option. the latest iPod updater is 2006-03-23 and can be downloaded here http://www.apple.com/ipod/download/

  • Not executed jobs with satisfied time windows ?

    Hello all,
    I have encountered a weird situation with scripts and jobchains that are using a time window. These scripts and jobchains are also using in their enclosing jobchain a pre condition that test whether their time window is satisfied or not (its status is set to 'skipped' if not).
    For the execution of last friday, these scripts and jobchains went to the status 'Skipped' although the related time windows were satisfied:
    TW specified to run on Friday (job planned for friday and not the following day)
    TW specified to run on the last workday of the month (job planned for friday and not the following day)
    So we have just made some tests with ad hoc script, jobchains and time windows to run on:
    Monday
    the first workday of the month
    Both of the tests worked.
    For information, these jobs have always run successfully (when needed) on others environments.
    Have you any idea of what is going on with these time windows?! what could be the cause of that behavior?
    Thanks anyway for your help.
    Regards,
    Yi Jiang

    Hi Yi,
    That's no problem, the cause is clear so this thread is useful because other people may also run into this.
    Maybe a tip that could fix your issue: if you do not use systimestamp to verify if the time window is open, but use the (planned) starttime of the chain, you can avoid this issue.
    By looking at if the starttime of the chain was on a day in a given timewindow, it no longer matters if the chain runs over midnight.
    You may need to change other things too, because in this second case, you cannot use a real time window on the call because that would still be taken into account and if you run over midnight, the window may not be open.
    So in this second scenario, you need:
    - a separate parameter P_TIME_WINDOW (and P_TIME_WINDOW_PARTITION) on the call to indicate which time window the precondition should follow; the call itself will no longer have an actual time window
    - a changed precondition, using the starttime of the chain and the parameter P_TIME_WINDOW (and P_TIME_WINDOW_PARTITION) on the call to determine if the call should run or not
    Let me know if you need more information.
    Regards,
    Anton Goselink.

  • Pci 6259 real time windows target matlab

    Hello everyone,
    I want to buy 1 NI PCI-6259, 2 Cables(SHC68-68-EPM Cable (2m))  and 2
    Connector Blocks (SCB-68 - Shielded).
    Would you please tell me do I need another hardwarefor
    this product?
    I want to this product with Matlab Real Time Windows Target.
    Would you please tell me do I need what software for
    this product to work with Matlab Real Time Windows Target?
    Best regards,
    Naser

    Hello Olivia
    I want to measure impedance of a device.
    I want to generate a chirp signal and measure impedance this
    device by NI PCI 6259.
    My frequency is about 10KHZ to 300KH.
    I use Windows xp for this task. I want to use Matlab software.
    So, for MAtlab software only DAQmx
    driver is needed?
    Best regards
    Naser

  • Submit Multiple Job Definitions/Job Chains with same Time window/Submit frame in mass

    Hi,
    We have a requirement to submit multiple Job Definition/Job Chains which are part of common Time Window/Submit frame/Queue....
    Ex. We have over 50+ different jobs/job chains which will runs Monday to Friday for every 2 hours on same Queue "XXX_Queue".  Instead of submitting each job/job chain manually, we would like to know if we could use any script that can achieve our requirement? since we have couple of other jobs which fall under same scenarios...
    We are on M33.104 version. Please let me know if any one has any scripts or alternate way of submitting multiple jobs/job chains in mass.
    Thanks in advance!
    Nidhi.

    Hi Nidhish,
    Here is some code to set some stuff on a job:
    //Get the partition, for global this is not necessary as global is default
    Partition part = jcsSession.getPartitionByName("GLOBAL");
    //Get the job definition
    JobDefinition jobdef=jcsSession.getJobDefinitionByName(part, "System_Info");
    //Get the submit frame
    SubmitFrame sf = jcsSession.getSubmitFrameByName(part, "SF_Every_Year");
    //Get the time window
    TimeWindow tw = jcsSession.getTimeWindowByName(part, "System_Week_WorkingHours");
    //Set the start time
    DateTimeZone dtz = new DateTimeZone(2015, 10, 18, 15, 0, 0, 0);
    //Get the Queue
    Queue SystemQ=jcsSession.getQueueByName(part, "System");
    //Create the Job
    Job infoJob=jobdef.prepare();
    //Attach queue to job
    infoJob.setQueue(SystemQ);
    //Attach submit frame, time window, start time
    infoJob.setSubmitFrame(sf);
    infoJob.setTimeWindow(tw);
    infoJob.setRequestedStartTime(dtz);
    //Print out the jobid of the job
    jcsOut.println(infoJob.getJobId());
    //Submit the job
    jcsSession.persist();
    Regards,
    HP

  • Adding existing schedular job to time window.

    Hello All,
    We are running 11.1.0.7.0 Database and we have one custom job , which runs daily around 2 PM . Now , we need to put this existing JOB into the maintained window , so that , if it exceeded the window , oracle will stopped it automatically. here , we need to put this GATHER_STALE_STATS_JOB into maintenance window, So , every time , it breached the time window, oracle will sent this job to stop shop.
    select owner , JOB_NAME , LAST_START_DATE , SCHEDULE_TYPE , state from DBA_SCHEDULER_JOBS ;SQL> SQL> SQL> SQL> SQL>
    OWNER           JOB_NAME                       LAST_START_DATE                                    SCHEDULE_TYP STATE
    SYSTEM          GATHER_STALE_STATS_JOB         17-JAN-13 03.00.09.070986 AM +02:00                CALENDAR     DISABLED

    Check this thread.
    Re: two simple questions
    In job attributes, STOP_ON_WINDOW_CLOSE needs to be set to TRUE

  • Quary : Implement Payroll without Time Management

    Hi,
             is it posiable implement Payroll without Time manage ment ?  if yes   while performing action ( PA40 )  what we hve have to mention in worke schdule..
    Edited by: prabu ganesh on Apr 30, 2011 1:50 PM

    Yes, it is possible to run PY without TM. But workschedule must be filled and choose time management status 7 - without Payroll Integration.
    Regards,
    Handoko

  • How to run rmiregistry each time windows starts

    Can anybody tell me how to run rmiregistry each time windows starts.
    I want to start my RMIserver automatically to work.First I need to start rmiregistry then I want to start my RMIServer class as windows service.

    Stick a shorcut to it in your Startup folder or create a new Key in the registry @ HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
    If you have arguements to rimreg (like port number) create a .bat script and use that to launch it.

  • How to insert, as an input variable within formula, the total time window on scope?

    How to insert, as an input variable within formula, the total time window on scope (i.e. 20ms/div x 10 div = 200ms)?
    BELOW IS AN EXAMPLE OF ISSUE:
    FORMULA FOR ACTION INTEGRAL:
    STATISTICS:
    Input variable: DPO4034(CH1);
    Check Box: number of samples.
    FORMULA
    Input variable 0: DPO4034(CH1); alias: x0
    Input variable 1: "Total Time Window on Scope???"; alias: x1
    Input variable 2: Number of Samples (CH1); alias: x2
    Under Operation Setup: Formula
    Y= (x0^2)*(x1/x2)
    Output: Processed Data 1 (CH1)
    THEN USING STATISTICS:
    Input signal: Processed Data 1 (CH1)
    Check Box: SUM
    Output: CH1 Action Integral [A^2s]
    Solved!
    Go to Solution.

    Hi again Catherine,
    I have now added another TekScope (TDS3032B) along with the DPO4034 and run the same work-around on the TDS3032B using CH1 as the "real" signal channel and CH2 as the "burst width" channel. However, the value returned for CH2 is nominally 99E+36 (min 99E+36, max 99E+36) with very few retrievals of correct burst width (~200ms). Seems the SignalExpress program is unable to consistently retrieve from TDS3032B the actual burst width (scope's time scale/window) and defaults to 99E+36 value. Any ideas on what is occurring and how to make it work? Attached are some screen captures to help guide discussion.
    Regards,
    Michael
    Attachments:
    TDS3032B - incorrect burst width.png ‏301 KB
    TDS3032B - correct burst width.png ‏287 KB
    DPO4034 - always correct burst width.png ‏302 KB

Maybe you are looking for