Scheduler and Job

Hi,
I faced a problem when creating a Scheduler utility has following features:
- do jobs in the body of thread (run() method)
- run daily, during time (for example: run from 1hAM -> 5hAM everyday)
Here are 3 classes i wrote, could someone help me, please. Many Tknsk
public class Job extends Thread{
boolean run = false;
protected void startJob(){
this.run = true;
this.start();
protected void stopJob(){
run = false;
package icom.in.utils;
import java.util.Date;
import java.util.Timer;
import java.util.TimerTask;
public class Scheduler {
     private Timer timer;
     private long repeat = 0;
     private long during_time = 0;
     private Date start_time = null;
     private Job jobs[];
     private long curr = 0;
     private Watcher watcher;
     public Scheduler(Job[] $jobs, Date start_time, long repeat, long during){
          this.jobs = $jobs;
          this.repeat = repeat;
          this.during_time = during;
          this.start_time = start_time;
          timer = new Timer();
          watcher = new Watcher();
          watcher.setDaemon(true);
          System.out.println("New instant created!");
     public void start(){
          timer.schedule(new ATask(),start_time, repeat);
     class ATask extends TimerTask{
          public void run(){
               curr = System.currentTimeMillis();
               System.out.println("RESTART THE THREAD!");
               if(jobs != null){
                    for(int i = 0; i< jobs.length; i++){
                         if(!jobs.run){
                              jobs[i].startJob();
                    if(watcher.isAlive()){}
                    else{
                         watcher.start();
                    synchronized (watcher) {
                         watcher.notify();
     class Watcher extends Thread{
          public void run(){
               while(true){
                    try {
                         Thread.sleep(1*1000);
                    } catch (InterruptedException e) {
                         // TODO Auto-generated catch block
                         e.printStackTrace();
                    long curr2 = System.currentTimeMillis();
                    long spend = curr2 - curr;
                    if(spend >= during_time){
                         for(int i = 0; i< jobs.length; i++){
                              jobs[i].stopJob();
                              System.out.println("Interrupted!");
                         synchronized(this){
                              try {
                                   wait();
                              } catch (InterruptedException e) {
                                   // TODO Auto-generated catch block
                                   e.printStackTrace();
     public static void main(String[] args) throws Exception{
          ThreadForTesting[] jobs = new ThreadForTesting[3];
          for(int i = 0; i < jobs.length; i++){
               jobs[i] = new ThreadForTesting();
               jobs[i].setName("Thread-"+i);
          Scheduler scheduler = new Scheduler(jobs, new Date(), 15*1000, 3*1000);
          scheduler.start();
          for(int i = 0; i < jobs.length; i++){
               System.out.println("State: " + jobs[i].isInterrupted()+", alive: " + jobs[i].isAlive());
          Thread.sleep(10000);
          for(int i = 0; i < jobs.length; i++){
               System.out.println("--State: " + jobs[i].isInterrupted()+", alive: " + jobs[i].isAlive());
package icom.in.utils;
public class ThreadForTesting extends Job{
     static int i = 0;
     public void run(){
          while(run){
               System.out.println("Thread:"+this.getName());
               try {
                    Thread.sleep(1*1000);
               } catch (InterruptedException e) {
                    // TODO Auto-generated catch block
                    //e.printStackTrace();
     public void stopJob(){
          run = false;
          this.interrupt();
}Brgds,
Chu Tuan Luyen
Edited by: ChuTuanLuyen on Oct 8, 2010 4:26 AM
Edited by: Quanduirach on Oct 11, 2010 12:39 AM

I think you can use Timer and TimerTask, google it. It's something like this
new Timer().schedule(new TimerTask() {
public void run() {
//your repeatable action, you can use Calendar to check whether it's the required hour
Calendar cal = new GregorianCalendar();
if(cal.get(Calendar.HOUR_OF_DAY) == 5){
//TODO
}, 0, interval); //interval can set to an hour, i.e.3600000

Similar Messages

  • Creating a job and scheduling a job error in OEM

    Hi, Everyone,
    I am trying to create and schedule a job thru OEM. In the the pl/sql block provide i have given my code like this
    begin
    SET SERVEROUTPUT ON;
    SPOOL C:\RFV_PROFILE_REPORT.LOG APPEND;
    SELECT TO_CHAR(SYSDATE, 'DD/MM/YY HH24:MI:SS') FROM DUAL;
    EXEC PAC_RFV_PROFILE_REPORT.CALL_ALL (200910);
    SELECT TO_CHAR(SYSDATE, 'DD/MM/YY HH24:MI:SS') FROM DUAL;
    SPOOL OFF;
    end;
    i have created the job and scheduled it but i am getting this error:
    Error # 6550
    Details ORA-06550: line 2, column 5: PL/SQL: ORA-00922: missing or invalid option ORA-06550: line 2, column 1: PL/SQL: SQL Statement ignored ORA-06550: line 3, column 7: PLS-00103: Encountered the symbol "C" when expecting one of the following: := . ( @ % ;
    could anyone pls help as this is very urgent.
    Thanks in advance

    Ah, the problem is you are confusing SQLPlus commands with PL/SQL.
    SET SERVEROUTPUT ON; -- This is a SQLPlus command, not necessary here.
    SPOOL C:\RFV_PROFILE_REPORT.LOG APPEND; -- This is a SQLPlus command, in PL/SQL to write out to a file you will need to call the UTL_FILE package to open a file for writing to. Except that the file you write to will appear on the database server, not your workstation, when the scheduled job runs.
    SELECT TO_CHAR(SYSDATE, 'DD/MM/YY HH24:MI:SS') FROM DUAL; -- In PL/SQL you need to SELECT columns INTO variables FROM tables. But in fact I guess you want to write the time to file using UTL_FILE again. However, you don't really need to do this, since scheduler will log the start time and run duration itself.
    EXEC PAC_RFV_PROFILE_REPORT.CALL_ALL (200910); -- This is the SQLPlus equivalent of the PL/SQL command:
    BEGIN
    PAC_RFV_PROFILE_REPORT.CALL_ALL (200910);
    END;
    SPOOL OFF; -- This is a SQLPlus command, not necessary here.
    So to summarise, all you really need is:
    BEGIN
    PAC_RFV_PROFILE_REPORT.CALL_ALL (200910);
    END;
    And the scheduled job will log the start time and duration in the database, which you can find here:
    SELECT * FROM USER_SCHEDULER_JOB_RUN_DETAILS

  • Schedule background Job Programatically at specified date and time

    Hi Everybody,
    how can i schedule a job  in background programatically for a spefic date and time ?
    Thanks and Regards
    srikanta

    Hi Chandrasekhar,
    my requirement is :
    in selection screen there will be two run mode :
    1) Run in Foreground
    2) Run in Background
    If user selects  ' Run in Background ' option , a block will open where user can give
    job schedule date  and
    job schedule time.
    Based on this date and time program will be scheduled in background.
    I have used like this :
    CALL FUNCTION 'JOB_OPEN'
          EXPORTING
            jobname                = v_jname
            SDLSTRTDT              = p_date
            SDLSTRTTM              = p_time
          IMPORTING
            JOBCOUNT               = v_jcnt
         EXCEPTIONS
           CANT_CREATE_JOB        = 1
           INVALID_JOB_DATA       = 2
           JOBNAME_MISSING        = 3
           OTHERS                 = 4.
    where v_jname is jobname
              v_jcnt   is jobcount
              p_date is  schedule date ( taken screen value)
             p_time is  schedule time ( taken screen value)
    but the job is sxcheduling immediately
    Give suggestion.
    Thanks in advance.
    Srikanta

  • How to deactivate Filter and Job in Job scheduling?

    Hi,
    My scenario is:
    XI will poll the file from 3rd party system and wil send to R/3 via IDOC adapter.
    On every sunday , R/3 will be down for 3-4 hrs for maintenance purpose.
    I need to create job scheduling in such a way that XI sould collect all the message coming on sunday during that period
    of time and after endtime has reached , it should process those message and should send the message to R/3 system.
    I have created Sender/Receiver ID ..also create Filter and a JOBID.
    while creating Job ID i specified the following
    1: Start Date    = 18.08.2009
    2:Start Time     = 11.00.00
    3:End Date      = 18.08.2009
    4:End Time      = 15.00.00
    5:Period          =  7
    6:Period Unit   = D (Days)
    Job should be scheduled at 11.00.00 and end at 15.00.00 ,filter and Job both should deactivate and after 15.00.00 it should process those messages.
    But the problem is it doesnt deactivate the filter.
    I tried using SXMS_JOB_DEACTIVATE and SXMS_START_JOB_AT_ONCE
    Both deacitvtes the JOB but not filter.
    Can any body tell me , how to go with it.
    Also if I have to write a report, what all things are required.
    regards,
    Mayank

    Hi Volker,
    Down time for R/3 is more ..so i am not sure whether XI will trying till that time or not.
    And XI is not able to than all the incoming messages in XI during that period of time will be Red Flag.
    can we write a report in XI such a way that .. all the queued messages should be processed ..thorugh Job scheduling.

  • How to schedule ETL jobs to run periodically after BI Apps is up and runnin

    Hi,
    How do you schedule ETL jobs to run periodically after BI Apps is install and configured? Is there document out there that explains how the ETL scheduling is setup?
    Thanks

    Using DAC we can schedule the ETL to run periodically. In DAC Execute -> Scheduler you can set the date and time for the ETL which need to be scheduled. You can get detail information in guide 'Oracle® Business Intelligence Data Warehouse Administration Console User’s Guide'

  • Window oracle job scheduler and Oracle server scheduler relationship

    Hi Experts,
    We use oracle 10G R4 in window 2003 server.
    From window server panel,we can see OracleJobSchedulerORCAID server is disable. However, I check oracle Jobs from EM.
    I can saw schedule jobs are running in there.
    What relationship is between window scheduler server and Oracle Schdeler?
    As I know we can stop/start window Oracle database serve,r DBconsle EM server and Listener server in window server to control oracle
    .Why window oracle schedule does not affect Oracle schdule job?
    Thanks Experts to explaining?
    JIm

    10g R4 is not an existing Oracle version. 10.2.0.4 is.
    Oracle EM has three different schedulers:
    - dbms_job
    - dbms_scheduler
    - EM's own scheduler. Jobs submitted in the EM scheduler are spawned by the Management Agent.
    Sybrand Bakker
    Senior Oracle DBA

  • How to activate Advanced Schedule on Requests and Jobs...

    Hi All,
    I'm trying to create a custom schedule on a concurrent request that will run jobs on the "first Wednesday of every month". I assume this can only be done through the Advanced schedule option under Schedule but the Advanced schedule option under our EBS 12 Suite seems to be disabled and greyed out and I don't know how to activate it... Is there a user priviledge/responsibility that has access to this or not cuz I'm currently logged in as Sysadmin.
    If anyone has any opitions, or has worked around this problem, please help...
    Macx

    I was asked to enable the advanced button to do something similar here. Dumbfounded when I found this in MetaLink Note 414658.1:
    {color:#0000ff}*Cause*
    This option is reserved for future releases for the fmb forms .
    Solution
    This is the standard behavior . This button is reserved for future releases and is not currently used .
    {color}{color:#000000}We'll probably just schedule the job in question to run once at the specified intervals.{color}

  • How to transport variants and scheduled background jobs

    Hi all
       Could anyone let me know if  variants be transported .
       also can scheduled background jobs transported.
    Thanks in advance

    Hi,
    Run the program RSTRANSP and give the name of the program and the variant name.
    It will create a transport request for the variant.
    the rest of the process is the same as is the case with all other transport requests.
    Regards,
    Raghu
    Message was edited by:
            Raghu Reddy

  • Best way to schedule and get notification for plsql job

    hi
    i would like to execute a procedure on weekly basis and want to be notified if the job fails
    which is correct way of doing this?
    1. create user defined metric and call the procedure this way
    2. create scheduler job dbms_scheduler
    the other question is while I have exception handling within plsql procedure, how will the grid agent or dbms_scheduler distinguish between success and failure ?
    do I have to set a variable or execute special command as part of exception handling ?

    Have you researched the ADD_JOB_EMAIL_NOTIFICATION procedure of DBMS_SCHEDULER?
    http://docs.oracle.com/cd/E11882_01/appdev.112/e25788/d_sched.htm#BABBFBGI
    This procedure adds e-mail notifications for a job. E-mails are then sent to the specified list of recipients whenever any of the specified job state events is raised.For more information about monitoring jobs, including a description of job logs and job email notifications, look here:
    http://docs.oracle.com/cd/E14072_01/server.112/e10595/scheduse008.htm
    You can configure a job to send e-mail notifications when it changes state. The job state events for which e-mails can be sent are listed in Table 28-13. E-mail notifications can be sent to multiple recipients, and can be triggered by any event in a list of job state events that you specify. You can also provide a filter condition, and only job state events that match the filter condition generate notifications. You can include variables like job owner, job name, event type, error code, and error message in both the subject and body of the message. The Scheduler automatically sets values for these variables before sending the e-mail notification.

  • How to schedule a job in another system.

    Hi,
    Now i have an ABAP program, which run in system ABC, client 001. i want to schedule a job in the program, with the function modules JOB_OPEN, JOB_SUBMIT, and JOB_CLOSE. But this job should run in ABC/002.
    How to write code?
    Who can help me on the requirement, or provide me another new solution except event trigger?
    Thanks & Best Regards,
    Johnney

    Here is the code. It works fine..
    FUNCTION Z_F_TRIGGER_REPORT.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(I_PROG) TYPE  D010SINF-PROG
    *"     VALUE(I_VARIANT) TYPE  VARIS-VARIANT
    *"     VALUE(I_MODE) TYPE  CHAR01
    *"  EXPORTING
    *"     VALUE(E_SUBRC) TYPE  SYST-SUBRC
    *"     VALUE(E_MSG) TYPE  CHAR80
    Functio ID :  Z_F_TRIGGER_REPORT
    TITLE      :  Report Trigger Tool
    Create Date:  15.03.2004
    Author     :  Denis Vieira
    Ownership : For the exclusive use of the Procter & Gamble Company
    Description:
    The purpose of this function module is to trigger programs
    requested remotely.
    AUTHORIZATION CHECKS
    OBJECT               AUTHORITY FIELDS         ABAP FIELDS
                     |                       |
    CHANGE HISTORY                                                      *
      DATE      |  Name  | Description                       | Reference *
    29.Jun.2006 | BA4513 | Unicode conversion and upgrade    | SPK290606
                |        | to My SAP ERP                     |
    **eject.
    Check if selected program exists in the destination file
      SELECT SINGLE  SUBC
             FROM    D010SINF
             INTO    D010SINF-SUBC
             WHERE   PROG    EQ  I_PROG
             AND     R3STATE EQ  C_A.
      IF SY-SUBRC NE C_0.
        MOVE  C_2                                               TO E_SUBRC.
        MOVE 'Report does not exist in destination system'(M01) TO E_MSG.
        EXIT.
      ENDIF.
    Check if program request is an executable program
      IF D010SINF-SUBC NE C_1.
        MOVE  C_2                                               TO E_SUBRC.
        MOVE 'Report is not an executable program'(M02)         TO E_MSG.
        EXIT.
      ENDIF.
    Check if selected variant exists in the destination file
      SELECT COUNT( * )
           FROM  VARIS
           INTO  W_COUNT
           WHERE REPORT  EQ I_PROG
           AND   VARIANT EQ I_VARIANT
           AND   DYNNR   EQ C_1000.
      IF W_COUNT EQ C_0.
        MOVE  C_2                                                TO E_SUBRC.
        MOVE 'Variant does not exist in destination system'(M03) TO E_MSG.
        EXIT.
      ENDIF.
      IF I_MODE EQ C_B.
        PERFORM 0100_BACKGROUND USING     I_PROG I_VARIANT
                                CHANGING  E_MSG  E_SUBRC.
      ELSE.
        PERFORM 0200_FOREGROUND USING     I_PROG I_VARIANT
                                CHANGING  E_MSG  E_SUBRC.
      ENDIF.
    ENDFUNCTION.
    *eject
    *&      Form  0100_background
    Executes Selected program in BackGround Mode VIA JOB
    *Block commented from here SPK290606
    *FORM 0100_BACKGROUND USING     L_PROG L_VARIANT
                        CHANGING  L_MSG  L_SUBRC.
    *Block commented till here SPK290606
    *Block added from here SPK290606
    FORM 0100_BACKGROUND USING    L_PROG    LIKE D010SINF-PROG
                                  L_VARIANT LIKE VARIS-VARIANT
                         CHANGING L_MSG     TYPE  CHAR80
                                  L_SUBRC   TYPE  SYST-SUBRC.
    *Block added till here SPK290606
      CONCATENATE C_AREA
                  C_UND
                  L_PROG
                  C_UND
                  SY-DATUM
                  C_UND
                  SY-UZEIT
                  INTO W_JOBNAME.
    Create a JOB and Get the Number for further execution
      CALL FUNCTION 'JOB_OPEN'
           EXPORTING
                JOBNAME  = W_JOBNAME
           IMPORTING
                JOBCOUNT = W_JOBCOUNT.
      IF SY-SUBRC NE C_0.
        MOVE  C_2                       TO L_SUBRC.
        MOVE 'Error opening job'(M07)   TO L_MSG.
        EXIT.
      ENDIF.
    Submit program
      SUBMIT (L_PROG)
        USING SELECTION-SET L_VARIANT
        VIA JOB W_JOBNAME NUMBER W_JOBCOUNT
        AND RETURN.
      IF SY-SUBRC NE C_0.
        MOVE  C_2                        TO L_SUBRC.
        MOVE 'Error Submitting Job'(M06) TO L_MSG.
        EXIT.
      ENDIF.
    Closes job to start its processing
      CALL FUNCTION 'JOB_CLOSE'
           EXPORTING
                JOBCOUNT  = W_JOBCOUNT
                JOBNAME   = W_JOBNAME
                STRTIMMED = 'X'.
      IF SY-SUBRC NE C_0.
        MOVE  C_2                       TO L_SUBRC.
        MOVE 'Error closing job'(M08)   TO L_MSG.
        EXIT.
      ENDIF.
      MOVE  C_0                                          TO L_SUBRC.
      MOVE 'Program Submitted in Background Mode'(M09)   TO L_MSG.
    ENDFORM.
    *eject
    *&      Form  0200_foreground
    Executes Selected program in ForeGround Mode VIA Submit
    *Block commented from here SPK290606
    *FORM 0200_FOREGROUND USING     L_PROG L_VARIANT
                        CHANGING  L_MSG  L_SUBRC.
    *Block commented till here SPK290606
    *Block added from here SPK290606
    FORM 0200_FOREGROUND USING    L_PROG    LIKE D010SINF-PROG
                                  L_VARIANT LIKE VARIS-VARIANT
                         CHANGING L_MSG     TYPE  CHAR80
                                  L_SUBRC   TYPE  SYST-SUBRC.
    *Block added till here SPK290606
      SUBMIT (L_PROG) USING SELECTION-SET L_VARIANT
             EXPORTING LIST TO MEMORY AND RETURN.
      IF SY-SUBRC EQ C_0.
        MOVE  C_0                                 TO L_SUBRC.
        MOVE 'Report submitted successfully'(M04) TO L_MSG.
      ELSE.
        MOVE  C_2                                 TO L_SUBRC.
        MOVE 'Error submitting report'(M05)       TO L_MSG.
      ENDIF.
    ENDFORM.

  • Schedule Background Job :  Remove delivery Block in Sales order

    Hi Gurus,
    I have a requirement to select all sales orders as per a condition and remove delivery block at
    VA02-> Go to -> Header -> Status
    For that I have to write a program which will be run only in background and i have to schedule background job for the same.
    I have a parameter at selection - No of records
    If no of records = 500 , I have to submit 500 jobs ie one job each for each sales order for removing delivery block.
    I need to know
    1) Which function module/bapi I can use to remove delivery block at sales order header level.
        For blocked delivery the status is 'BSTK" . to remove block i need to change status to "RSTK".
    2) How to schedule a background job for my program and how to submit one job each for each sales   order.
    Regards
    Avi.

    Hi Avi,
    Would like to seek for your advice. I am facing the same scenario too which is to delete the delivery block but is deletion of the delivery block is done in the user exit MV45AFZZ. The subroutine which needs to have the extra logic of deleting the delivery block is USEREXIT_SAVE_DOCUMENT_PREPARE.
    Need your advice on how do you solve this scenario? Thanks in advance.

  • Unable to schedule a job from the Jobs Library

    Hi,
    I have created and stored a job in the Job Library, however when I try and submit it to run with a schedule and against specified targets Grid just seems to hang, and eventually it comes back with "Application server is not responding". I have set it up as a sql script and used a PL/SQL block, I have tested the script outside of Grid and it works fine. I have tried using prefered credentials and override credentials, but this makes no difference.
    I am running OEM 10g Release 3 on Red Hat Enterprise Linux AS release 4 (Nahant Update 4)
    Anybody had anything similar?

    Thanks for the reply. Tested connectivity to both databases from Grid all looks good. Attempted to set up a job individually for each db and it hung on both, again I tried using default credentials and override credentials.

  • Error in Schedule Background Job for Deadline Monitoring of swu3

    While Auto Customization swu3 i am getting error message 'Output device "" not known' in 'Schedule Background Job for Deadline Monitoring'
    Please advice what could be cause of it

    the earlier problem of background job was solved by changing the  output device assigned to user wf-batch .
    regarding the transport request :
    when i was trying to execute the step : "Schedule bakgrd for missed deadlines " MANUEL it was giving me an option of SAVE AND SCHEDULE . which was creating the transport request . but when i executed it automatically it worked fine without asking a request to me ... i don't know why )-: ... probablly we can specify a different interval then the standard of three minutes and which will be transported (it's just a guess) . i have  executed it  automatically ...
    well thanks all for u r help

  • HELP scheduling a job to run within a window

    Hi,
    I am trying to create a job that can only run at certain times of the day. Since I will be creating a lot of these jobs (each of which will run once), I thought I could use a window to define when this job runs. As a test, I tried the following:
    begin
       dbms_scheduler.create_window(
          window_name => 'TEST_WINDOW',
          resource_plan => null,
          repeat_interval => 'FREQ=DAILY',
          duration => INTERVAL '24' hour,
          window_priority => 'LOW'
       dbms_scheduler.create_job(
          job_name => 'TEST_WINDOW_JOB',
          job_type => 'PLSQL_BLOCK',
          job_action => 'BEGIN NULL; END;',
          schedule_name => 'SYS.TEST_WINDOW',
          enabled => true );
    end;
    /But this doesn't work as expected.
    1) all_scheduler_windows shows that TEST_WINDOW is not ACTIVE. However, if I try to explicitly open the window with DBMS_SCHEDULER.OPEN_WINDOW, I get an error saying the window is currently open.
    2) The job is created, but its STATE is set to SCHEDULED and it doesn't run even though the window is open and the job is enabled. (I also tried creating a job using a window that was ACTIVE in all_scheduler_windows and got the same results).
    Can anyone point out what I am doing wrong here?
    Thank you,
    Eric

    Hi Eric,
    Two things.
    1) You can have a schedule which repeats once an hour (or even once a minute) from 8pm till 7am and then point all your jobs to this schedule. You will need to set max_runs for the jobs to 1 before enabling them. So they will only run on the given schedule and only once. A possible repeat interval for the schedule is :
    freq=minutely;bysecond=0;byhour=20,21,22,23,0,1,2,3,4,5,6,7;byday=MON,TUE,WED,THU,FRI
    2) By default, the database comes with several pre-created windows and a MAINTENANCE_WINDOW_GROUP . This window group is supposed to be user-modified to periods where it is ok to do maintenance tasks. You may be able to point your jobs to this window group or one of its windows, if you want your jobs to run during this period.
    Hope this helps,
    Ravi.

  • How to schedule the job to run evry Sunday at 12 P.M IST.

    Hi Experts,
    I want to schedule a job which will run evry Sunday at 12 P.M IST.
    I have written the below script.
    [code]BEGIN
      SYS.DBMS_SCHEDULER.CREATE_JOB
           job_name        => 'SERVICE_SAL_FS.SAL_MESSAGE_BUFFER_PURGE_JOB'
          ,start_date      =>  SYSTIMESTAMP
          ,repeat_interval => 'FREQ=WEEKLY; BYDAY=SUN; BYHOUR=12;BYMINUTE=0; BYSECOND=0;'
          ,end_date        =>  NULL
          ,job_class       => 'DEFAULT_JOB_CLASS'
          ,job_type        => 'STORED_PROCEDURE'
          ,job_action      => 'SERVICE_SAL_FS.SAL_MESSAGE_BUFFER_PURGE_PROC'
          ,comments        => 'Run at 12 P.M.IST every Sunday'
          ,enabled            => TRUE
    END;[/code]
    But the server in US.
    [code]SELECT sysdate from Dual;
    6/11/2013 3:58:58 AM
    --But the time in India is 02:28 PM [/code]
    How to convert the timezone to IST.
    Please help me how to schedule the job to run evry Sunday at 12 P.M IST.
    Thanks.

    Did you read DBMS_SCHEDULER docs:
      The calendaring syntax does not allow you to specify a time zone. Instead the Scheduler retrieves the time zone from the start_date argument. If jobs must follow daylight savings adjustments you must make sure that you specify a region name for the time zone of the start_date. For example specifying the start_date time zone as 'US/Eastern' in New York will make sure that daylight saving adjustments are automatically applied. If instead the time zone of the start_date is set to an absolute offset, such as '-5:00', daylight savings adjustments are not followed and your job execution will be off by an hour half of the year.
      When start_date is NULL, the Scheduler will determine the time zone for the repeat interval as follows: 
    It will check whether the session time zone is a region name. The session time zone can be set by either:
    Issuing an ALTER SESSION statement, for example:
    SQL> ALTER SESSION SET time_zone = 'Asia/Shanghai'; 
      Setting the ORA_SDTZ environment variable.
      If the session time zone is an absolute offset instead of a region name, the Scheduler will use the value of the DEFAULT_TIMEZONE Scheduler attribute. For more information, see the SET_SCHEDULER_ATTRIBUTE Procedure.
      If the DEFAULT_TIMEZONE attribute is NULL, the Scheduler will use the time zone of systimestamp when the job or window is enabled.
    SY.

Maybe you are looking for

  • How i fix the error 1015 for my iphone3g coz my phone i opining

    how i fix the error 1015 for my iphone3g coz my phone i opining and also i can use since i face that problem

  • IChat to PC-AIM Video not working - even dialup

    I know that this a common problem, but I cannot find any solutions in this group. MacBook Pro 10.4.6, iChat to PC. My side is Mac, wireless via Airport and a dlink ADSL Modem/Router. I can chat with video with no problems to either another Mac or PC

  • Which is better? Code comparsion of performance and style

    Recently I run into a discussion over a small piece of code. Could help me which is better, either in performance or coding style? The code is not complete, the question is the use of local cancellationNumber variable. public String cancelAction(/**/

  • Dashboard help?

    hello I am trying to make a widget contacts list in dashboard through one of my chat programs I use. I just want to be able to see whose online through the widget how can I get my contacts onto the widget, is there anyone who can help me get started?

  • ADD new fields Who's WHo

    Im trying to add new fields to Advanced search in WHO's Who settings which are customs fields Z from infotype 1008; I customized new infoset copy from standard adding this infotype, but im getting error when i run de query on ESS, anyway Who's who do