Results 1 to 5 of 5

Thread: Job Interval

  1. #1
    Join Date
    Sep 2003
    Location
    Chiang Mai Thailand
    Posts
    14

    Post Unanswered: Job Interval

    Hi
    I try to change job interval time to everyday midnight to update table.

    from JOB SUBMIT statement

    DBMS_JOB.SUBMIT(
    Job
    What
    Next_date
    Interval
    No_parse )

    from interval
    How can I add job to run every mid night.
    I try 'sysdate+1'. It will run tomorrow at submit time.
    I try 'sysdate+1/24'. It will run tomorrow at submit time plus one hours.

    How can I fix this problem?
    Kindly regards,
    Thana p.
    Chiangmai Thailand
    Yim_cm@hotmail.com

  2. #2
    Join Date
    Mar 2002
    Location
    Reading, UK
    Posts
    1,137
    try trunc(sysdate+1)

    Alan

  3. #3
    Join Date
    Apr 2003
    Location
    Greenville, SC (USA)
    Posts
    1,155
    I find it useful to set my jobs at specific times for the next day...
    You can also use

    SELECT TO_CHAR(trunc(sysdate) + 1 + 2/1440,'DD-MON-YY HH:MIS pm') FROM DUAL;

    Run this try SQLPlus until you get the right time you are looking for.
    the 2/1440 is minutes in the day .... Change the 2/1440 to 3/1440
    and you get 12:03 am ... etc ...

    hth
    Gregg

  4. #4
    Join Date
    Sep 2003
    Location
    Chiang Mai Thailand
    Posts
    14

    Post can not set time interval

    I try as your recommend

    1:VARIABLE JOB NUMBER;
    2:BEGIN
    3BMS_JOB.SUBMIT(
    4::JOB,
    5:'UPDATE T_DATE_MS SET I_TODAY =
    6SELECT TO_CHAR(SYSDATE,"YYYYMMDD") fro
    7:sysdate,'trunc(sysdate) +1 ';
    8:commit;
    9:end;
    10:/
    At line 7 its return error
    I try many patterns like
    sysdate,trunc(sysdate) +1 ;
    sysdate,''trunc(sysdate) +1''; two single quote

    How can I fix this?
    Kindly regards,
    Thana p.
    Chiangmai Thailand
    Yim_cm@hotmail.com

  5. #5
    Join Date
    Sep 2003
    Location
    Chiang Mai Thailand
    Posts
    14

    Talking oops

    sorry
    Now I can fix this.
    Thanks alot for help.
    Kindly regards,
    Thana p.
    Chiangmai Thailand
    Yim_cm@hotmail.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •