Submit job to begin at 0230 hrs and run daily

Hi,
Oracle version - 10.2.0.4
Env- Windows 32 bit 2003 server R2
I scheduled a job with the below command to run on daily basis by exactly 02:30 am but the job is not running as per scheduled, it's running 30 minutes before the schedule.
Command used to schedule the job.
DECLARE
X NUMBER;
BEGIN
SYS.DBMS_JOB.SUBMIT
( job => X
,what => 'TESTJOB(20,20302);'
,next_date => to_date('10/08/2011 02:30:00','dd/mm/yyyy hh24:mi:ss')
,interval => 'TRUNC(SYSDATE+1)+2/24'
,no_parse => FALSE
SYS.DBMS_OUTPUT.PUT_LINE('Job Name is TEST JOB ' || to_char(x));
COMMIT;
END;
I came to know this when i queried the dba_jobs view last_date column,
JOB WHAT NEXT_DATE LAST_DATE
123 TESTJOB(20,20302) 08/17/2011 *02:00:00* 08/16/2011 *02:00:03*
Can you pls let me know where i am wrong !!
Thanks
Edited by: 879545 on Aug 16, 2011 2:22 AM

879545 wrote:
,interval => 'TRUNC(SYSDATE+1)+2/24'Use 2.5 :
SQL> select trunc(sysdate+1)+2/24
  2  from   dual;
TRUNC(SYSDATE+1)+2/24
17-aug-2011 02:00:00
SQL> select trunc(sysdate+1)+2.5/24
  2  from   dual;
TRUNC(SYSDATE+1)+2.5/24
17-aug-2011 02:30:00Nicolas.

Similar Messages

  • Help trying to get the F_ApiWinConnectSession initialized and running in the background.

    Fellow FM Developers,
    I have the FDK8 and have been using framemaker as a processor of templates. We have successfully written a program that uses the framemaker in a user account currently logged in. In other words, USER A logs in with their account on Computer A and processes files just fine.  Now, we would like to set up a system where jobs are submitted by USER A and runs on a remote Computer B which processes the document and saves it as a PDF.
    We want to make it so users can submit a job through a web service using the .NET framework. We have tried to do this, however we are failing on one crucial part of our development. I am trying to use the single most important (asynchronis) connectivity line:
    F_ApiWinConnectSession( NULL, NULL, &ClassID );
    This is because we want to have framemaker start in the background with this execution of this service.  Unfortunately, without the GUI available this command fails.  We have obviously created a Progid and it has been registered in the registry. We did this by runnning :
    FrameMaker.exe /progid:FrameMaker.Automation.2 /auto
    Can anyone help me with trying to get framemaker to run in a background.  Is there a way to process the documents without have the GUI up and loaded and then have it process the document.
    Your help is greatly appreciated,
    Adam

    Adam,
    The server license is more tuned to the type of output that you are creating, regardless of the number of users. If you are creating content from external sources and generating a PDF in an automated way via FM, then you need a server license (period).
    Read your FM EULA carefully.
    2.2.  Limitations on Server and Network Use.  You may install one copy of  the Software on your Computer file server for the sole purpose of downloading  and installing the Software onto other Computers within your internal network up  to the Permitted Number, provided that the total number of users that are  permitted to download and install the Software from such Computer file server,  does not exceed the Permitted Number.  Except as explicitly described above, no  other network or server use is permitted under this license, including but not  limited to, using the Software either directly or through commands, data or  instructions from or to any other Computer, for internet or web hosting services  or by any user not licensed to Use this copy of the Software through a valid  license from Adobe.  For the avoidance of doubt, this Agreement does not permit  the Software to be Used in any batch-oriented environment where such Use of the  software is to produce Postscript or PDF output from data originating from any  other application, unless such Use is merely incidental to a Use clearly  permitted by the license.To obtain rights for additional server, batch oriented  or network licensing uses, you may purchase a license(s) for the FrameMaker®  Server product. The FrameMaker Server product license is available for review  at, http://www.adobe.com/products/eulas/main.html.
    This has greatly impacted the database publishing side of things. If all of  your content is completely created in FrameMaker, then you should be ok.  However, if you create or get any content outside of FrameMaker and pass it  through FM to make your documentation sets, then according to Adobe, you need to  be using the FrameServer product (for creating the PDFs).

  • Jobs taking more than 3 hrs to complete!!!

    i have a job which creates indexes..
    the job used to get completed within 28 mins..
    however yesterday it took more than 3 hrs and still running..any ideas ??

    however yesterday it took more than 3 hrs Start by checking the execution plans for the historical SQL and ensure that they are the save (see dba_hist_sqlplan). If the execution plans changed, that's a big clue.
    It could be several things:
    - Did you re-analyze stats recently?
    - Could there be contention for data blocks?
    Run a STATSPACK report for both time periods, and you should be able to see the exact issue.
    Hope this helps. . .
    Donald K. Burleson
    Oracle Press author

  • Run a Job (DBMS_Scheduler) at 11:30 am and 5:30 pm every day

    Version:10gR2
    I want to run a job at at 11:30 am and 5:30 pm every day. After setting
    start_date        =>  sysdate,
    repeat_interval   =>  'freq = daily;Don't know how to set BYHOUR and BYMINUTE parameters twice in a day

    You'll probably want a repeat interval like this:
    FREQ=DAILY;BYHOUR=11,17;BYMINUTE=30;BYSECOND=0The DBMS_SCHEDULER package provides a procedure called EVALUATE_CALENDAR_STRING which allows you to test different repeat intervals and see if they meet your requirements. They even provide example code that you can easily copy and modify.
    The documentation also goes into great detail about the Calendaring Syntax. It's worth a read.
    For example here is the code I used to test your requirement.
    DECLARE
            start_date        TIMESTAMP;
            return_date_after TIMESTAMP;
            next_run_date     TIMESTAMP;
    BEGIN
            start_date := systimestamp;
            return_date_after := start_date;
            FOR i IN 1..5 LOOP
                    DBMS_SCHEDULER.EVALUATE_CALENDAR_STRING
                    ( 'FREQ=DAILY;BYHOUR=11,17;BYMINUTE=30;BYSECOND=0'
                    , start_date
                    , return_date_after
                    , next_run_date
                    DBMS_OUTPUT.PUT_LINE('next_run_date: ' || next_run_date);
                    return_date_after := next_run_date;
            END LOOP;
    END;
    /

  • Submit Job error... need help....

    I got this error when I click on "Submit Job" button to submit a Backup job in 10g EM. Anyway to solve this ?
    The job submission has failed for the following reason
    ORA-20900: Could not find credential set DBHostCreds for target type oracle_database ORA-06512: at "SYSMAN.MGMT_CREDENTIAL", line 649 ORA-06512: at "SYSMAN.MGMT_CREDENTIAL", line 1309 ORA-06512: at "SYSMAN.MGMT_JOBS", line 263 ORA-06512: at "SYSMAN.MGMT_JOBS", line 48 ORA-06512: at line 1

    It look like you didn't set the credential for the node and database. check it out and try your operations.
    SJH
    OCP DBA

  • Using Start-Job to launch multiple SSH sessions and esxtop?

    Hello folks,
    I am trying to start an esxtop session on multiple esx servers at the same time.
    I started trying using Start-Job thinking it would help do it asynchronously.
    The script I have below works on one host so far, but need suggestions to repeat it for multiple hosts, thinking by looping through changing the $i each time?
    Checking if anyone would have comment?
    $i = 1
    $seconds = 5
    $iterations = 2
    $esxtopfile = "esxtop$i_$((Get-Date).ToString('MMddyyy-hhmm')).csv"
    $ComputerName = "z420esxi$i.domain.net"
    # Start an esxtop session using SSH.net and start an esxtop command - module already loaded.
    $sb = {New-SshSession -ComputerName $($args[0]) -KeyFile C:\esxi-key-openssh.key -Username root
           Invoke-SshCommand -ComputerName $($args[0]) -command "esxtop -d $($args[1]) -a -b -n $($args[2]) > /tmp/$($args[3])"     
    Start-Job  -ScriptBlock $sb -ArgumentList $ComputerName,$seconds,$iterations,$esxtopfile | Wait-Job | Receive-Job

A: Using Start-Job to launch multiple SSH sessions and esxtop?

You're starting for a job, waiting for that job to complete and then finally receiving that job
before allowing anything else to happen with your script.
In other words, if you had some code after the Start-Job line, it would not be executed until the job had completed and you had received the job, which partially negates the benefits of using a job to begin with (specially bearing in mind you don't have
a form).
The way to achieve what you're after is to start all jobs at the same time, one per ESX host, and then finally to wait for all jobs and collect all jobs at the end.
Here's a quick example that starts 5 jobs and wait for all of them to complete before receiving the results.
$jobs = @()
$jobs += 1..5 | ForEach-Object {Start-Job -ScriptBlock {Sleep $args[0]; "I just slept for $($args[0]) seconds"} -ArgumentList $_}
[void] (Wait-Job $jobs)
Receive-Job $jobs
Notice that each of the subsequent jobs will take longer and longer to run, with the first being the fastest and the last the slowest. Still, I'm waiting for *all* jobs to complete before performing the Receive-Jobs on all of them at the same time.

You're starting for a job, waiting for that job to complete and then finally receiving that job
before allowing anything else to happen with your script.
In other words, if you had some code after the Start-Job line, it would not be executed until the job had completed and you had received the job, which partially negates the benefits of using a job to begin with (specially bearing in mind you don't have
a form).
The way to achieve what you're after is to start all jobs at the same time, one per ESX host, and then finally to wait for all jobs and collect all jobs at the end.
Here's a quick example that starts 5 jobs and wait for all of them to complete before receiving the results.
$jobs = @()
$jobs += 1..5 | ForEach-Object {Start-Job -ScriptBlock {Sleep $args[0]; "I just slept for $($args[0]) seconds"} -ArgumentList $_}
[void] (Wait-Job $jobs)
Receive-Job $jobs
Notice that each of the subsequent jobs will take longer and longer to run, with the first being the fastest and the last the slowest. Still, I'm waiting for *all* jobs to complete before performing the Receive-Jobs on all of them at the same time.

  • OEM submit job for EJB

    Could I use OEM to submit a job and call an EJB session bean? If answer is yes , could you point me to the right direction , steps should I perform in OEM.
    Thanks
    Suhail

    This is the Basic code to Achieve that.
    Call Function 'JOB_OPEN'
    SUBMIT RSBDCBTC
    via background Job <Job info>
    With QIE = <QID Returned by BDC_OPEN_Group FM>
    AND RETURN.
    Call Function 'JOB_CLOSE'
    2) Also go through this
    DATA: lv_job_name LIKE tbtco-jobname,
    lv_job_nr LIKE tbtco-jobcount,
    lv_job_released TYPE c,
    lv_job_start_sofort TYPE c,
    lv_print_parameters TYPE pri_params.
    lv_job_name = 'Z_BGPROGRAM'.
    CALL FUNCTION 'JOB_OPEN'
    EXPORTING
    jobname = lv_job_name
    IMPORTING
    jobcount = lv_job_nr
    EXCEPTIONS
    cant_create_job = 1
    invalid_job_data = 2
    jobname_missing = 3
    OTHERS = 4.
    IF syst-subrc = 0.
    " submit job with all the selection screen params...
    SUBMIT (lv_job_name)
    WITH applfile = applfile " these are the parameters of the background program
    WITH p_lines = p_lines
    USER syst-uname " you must use this
    VIA JOB lv_job_name NUMBER lv_job_nr AND RETURN.
    IF sy-subrc = 0.
    CALL FUNCTION 'JOB_CLOSE'
    EXPORTING
    jobcount = lv_job_nr
    jobname = lv_job_name
    strtimmed = 'X'
    IMPORTING
    job_was_released = lv_job_released
    EXCEPTIONS
    cant_start_immediate = 1
    invalid_startdate = 2
    jobname_missing = 3
    job_close_failed = 4
    job_nosteps = 5
    job_notex = 6
    lock_failed = 7
    OTHERS = 8.
    IF syst-subrc <> 0.
    MESSAGE i162(00) WITH
    'An error occured while closing the background job.'.
    STOP.
    ENDIF.
    ENDIF.
    ENDIF.
    SKIP 1.
    WRITE: / 'Background process', lv_job_name , 'called successfully' NO-GAP.
    WRITE: / 'You can check the job in transaction SM37'.

  • Customer service promised me call back in 24 hrs but it has been 72 hrs and I m still waiting for the call,,,,,

    Apple sent me replacement phones and both with different coverage on them. Repair coverage finishing lot earlier then what I had on the original defective phones. Now they are telling me that he phones they received were different then the ones in Repair Case. After 150 minutes long phone call the rep said me that somebody will call me within 24 hrs and I m still waiting for the call after 3 days. the conversation was polite and helpful all the way from both sides but now I feel like Apple reps are trying to avoid this problem because this is their problem that most likely they misplaced my phones in their wharehouse and after my call (one week after the phones received by apple) they started looking for it.
    I had the repair status updated in my profile after I received the new wrong phones. Even the acknowledgement email from apple mentioning that they have sent out the replacement product came to my inbox two days after I received the phones.
    Is this Mr.Jobs Apple ?
    Does anyone has Customer service email address ?

    I know there is a contact us tab on the web page and thats what I have mentioned here that what happened when I called them.
    thanks for ur input though,

  • Destination disabled. []: [CrystalEnterprise.Ftp]. Please note the name of the job server used for your request and contact your system administrator to make sure the specified destination is enabled. (FWB 00031)

    Hi
    In BO 4.0 SP 9 when a administrator tries to schedule a report via CMC there is no error
    But when a user schedules a report and the destination is FTP location -> Use default settings he gets following error
    Destination disabled. []: [CrystalEnterprise.Ftp]. Please note the name of the job server used for your request and contact your system administrator to make sure the specified destination is enabled. (FWB 00031)
    There is only one Job Server and the destinations are enabled in it
    There is no Job server for Crystal Reports Job Server
    Do i need to create it and how.

    Please check if you have proper rights to schedule to FTP. You can create a new job server, whenever you schedule it, there are multiple job servers, it will handle based on the load. But it is not mandatory, depends on the load.

  • I am not able to open my itunes as of about 4 days ago.  I run Windows 7... I've have a computer tech in my office for 2.5 hrs and we could not get my itunes up and running.  I now need your help!  (I've paid 150.00 in fees to my computer guy.)

    I have had itunes forever!!  When I try to open my itunes now...it says I am missing MSVCR80.dll.
    I had my computer tech in and he was unsuccessful after 2.5 hrs and 150.00 later.
    I run windows 7 and have for about 3 years....and only now, just lost my itunes. 
    What is going on?  As I also by my music by itunes and had a 25.00 credit on it
    How can you help me? 

    Hi Coreenfrombc,
    If you are having issues with iTunes after an attempted update, you may find the following article helpful:
    iTunes 11.1.4 for Windows: Unable to install or open
    http://support.apple.com/kb/TS5376
    Regards,
    - Brenden

  • Beginning of the Quarter and Beginning of the Semester of a Date.

    Hi,
    I'm writing a PL/SQL program and I'm facing the following problem:
    I have a date D in the format 'dd/mm/yy' and I want to get the beggining of the quarter in which this date is located , and also the beginning of the semester in which the date is located. I want the beginning of the quarter and the beggining of the semester in the format 'dd/mm/yyyy' (which is the format of the date D).
    For example, if my date D is 12/11/2007 , the beginning of the quarter is ,in the format 'dd/mm/yyyy', 01/10/2007, and the beginning of the semester is ,in the same format 'dd/mm/yyyy', 01/06/2007.
    Thanks you in advance for your help.

    I guess, that beginning of semester would be 01/07/2007 rather than 01/06/2007
    Quarter : Just TRUNCATE your date with Format 'Q'
    Semester: I think there is no format for semester, but with the formula below you can achieve it...
    SELECT TRUNC(SYSDATE,'Q')
          ,TRUNC(ADD_MONTHS(sysdate,(1-MOD(TO_CHAR(SYSDATE,'Q'),2))*-3),'Q')
      FROM dual
    /The result will be a date, so formatting is up to you.
    hth

  • Exception:"Decrease the number of char between the beginning of the document and its root element"

    I'm now using a javabean in my jsp page to parse xml;when my xml file's size is
    about 10k,it just work fine;when my xml file's size became 50k,it throws the followng
    Exception:
    Failed to open xml document,Failed to retrieve Public id or system id from the
    document. Decrease the number of char between the beginning of the document and
    its root element. But when I run this javabean in JBuild ,it works fine no matter
    how big the xml file becomes;
    Why? the error message is in the attachment.

    The prologue must be included at the top of the document, followed by the root
              element.
              joden2000 wrote:
              > what does this exception mean:decrease the number of char between the beginning
              > of the document and its root element? When my xml file is about 10k,it works
              > just fine,when it becomes 50k ,the exception show.How can I deal with this?
              

  • Dbms_job.submit job twice a month on particular days

    Hi,
    I would like to setup and run the same job that runs on the 9th and 27th of each month.
    i do not mind if i have to run them separately with two jobs, but i cant figure out the interval syntax to use
    help appreciated.
    thanks
    k

    Hi,
    The best answer to "How do I do this ... using DBMS_JOB?" is usually "Don't use DBMS_JOB. Use DBMS_SCHEDULER instead."
    If you really want to use DBMS_JOB, you can have a CASE expression in the INTERVAL argument, like this:
    INTERVAL => 'CASE '     
         ||     'WHEN  TO_CHAR (SYSDATE, ''DD'') < ''27'' '     -- See note below
         ||     'THEN  TRUNC (            SYSDATE,     ''MONTH'') + 27 '
         ||     'ELSE  TRUNC (ADD_MONTHS (SYSDATE, 1), ''MONTH'') + 9 '
         ||  'END'If the job finishes before the 27th of the month, then it will run again on the 27th of the same month.
    Otherwise, it will run again on the 9th of the following month.
    Edited by: Frank Kulash on Mar 1, 2011 9:24 AM
    Right after the '<'. this site won't display two single-quotes together. There should be two apostrophes before 27, just like there are after it.

  • Submit job in user exit

    Hi sap expert,
    Please guide me for the abap coding. my requirement is when i create outbound delivery note, then press SAVE button, serial number will be automatic proposed.
    Now , i process as below sequent.
    1. using user exit MV50AFZ1 -> FORM USEREXIT_SAVE_DOCUMENT
    in this user exit i submit background job to change oubound delivery
    2. in the background job, i call BAPI BAPI_OUTB_DELIVERY_CHANGE to change serial number
    Question.
    1. This step right or wrong, if wrong, please suggest
    2. How to coding --> submit job from the user exit
    Thank you in advance
    Jean

    Hi,
    Most of the guys around are with functional experience.
    I think you should post this query in SAP-ABAP. U will get
    an immediate reply.
    Kind Regards
    Chakradhar

  • The job is experiencing a transient failure and processing may be delayed

    Hi,
    I get the following error (in the management services operation logs) every 10-15 minutes.
    What does it mean?
    Thanks.
    "The job is experiencing a transient failure and processing may be delayed"
    Correlation ID:
    340f6e80-8559-4892-b61a-84bad23f947a
    Message:
    The job is experiencing a transient failure and processing may be delayed.
    Message Time:
    01/31/2015 19:56:07 UTC
    Microsoft.Resources/EventNameV2:
    controller
    Microsoft.Resources/Operation:
    Information
    Microsoft.Resources/ResourceUri:
    /subscriptions/b4104220-ea0c-4a63-b0c2-a3c80ba30e23/resourceGroups/StreamAnalytics-Default-West-Europe/providers/Microsoft.StreamAnalytics/streamingjobs/soiotbesajob
    Janiv Ratson. Technology and Development Expert. | BL: http://blogs.microsoft.co.il/blogs/janiv/ | LI: http://www.linkedin.com/in/janiv | TW: http://twitter.com/janiv http://about.me/janiv

    Hi Janiv,
    Below is a query that I believe should work for you. This query will do a sum when Type is 10 and an average when Type is 11:
                SELECT
                deh.name as NAME,
                deh.type as EventType,
                SUM(value) as EventCount,
                COUNT(*) as Occurrences
                FROM input as deh
                WHERE deh.type = 11
                GROUP BY deh.type, deh.name, TumblingWindow(minute,5)
                UNION
                SELECT
                deh.name as NAME,
                deh.type as EventType,
                AVG(value) as EventCount,
                COUNT(*) as Occurrences
                FROM input as deh
                WHERE deh.type = 10
                GROUP BY deh.type, deh.name, TumblingWindow(minute,5)
    Concerning Device_Id, currently, we do ask that the fields be consistent and explicitly provided for each and every event. We cannot look at a previous event and get a field value from there.
    I hope this answers your question,
    Thanks

  • Maybe you are looking for

    • Is there a way to create an intro splash page?

      Is there a way to creat a intro splash page that people can click through to the home page? I need the actual homepage to stay as the index.html. Any solutions?

    • Customer statement date formate

      Hi SAP guru When i executed customer statement in f.27 print has dd/mm/year formate some times mm/dd/year formate but it is coming only in Production server itself. I tested in quality and testing servers in which not a problem. I checked in SU3 also

    • Accounting documents with payment details line item

      Dear all, when i create witth transaction TBZ1 the account document related to a deposit financial transaction i generate a line with negative amount on the account related to the business partner ( FTR-EDIT / PAYMENT DETAILS / PAYER-PAYEE ). I need

    • HT4623 how to use itunes and download IOS for the phone

      Hi Recentle i am having problem using whats app application, it says my IOS system does not support....how do i use the I-tunes to down load this into my phone.  Thanks

    • Source-System: MaxDB 7.5.0

      Hey Folks, I'm trying to create a Source System in my BW which connect to a MaxDB Vers. 7.5.0. The BW is runing in a different network (intranet) as the MaxDB (localhost of another intranet). Now I get the following Error: