DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: scheduler job didn't get created even it was executed successfully

  1. #1
    Join Date
    Mar 2006
    Posts
    176

    scheduler job didn't get created even it was executed successfully

    below is my code:


    both (program and job) were executed without error but when I check dba_scheduler_jobs, I can't see the job at all, what did I do wrong?



    begin
    dbms_scheduler.create_program
    (
    program_name => 'REFRESH_SCRIPT',
    program_type => 'EXECUTABLE',
    program_action => '/usr1/oracle/scripts/refresh.sh',
    enabled => TRUE,
    comments => 'calling shell script');
    end;
    /



    begin
    dbms_scheduler.create_job
    (
    job_name => 'REFRESH',
    program_name => 'REFRESH_SCRIPT',
    comments => 'job to start refresh',
    enabled => TRUE);
    end;
    /

  2. #2
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166
    Quote Originally Posted by matthew00 View Post
    both (program and job) were executed without error but when I check dba_scheduler_jobs, I can't see the job at all, what did I do wrong?
    When you don't specify repeat_interval or tell the scheduler to keep a job, it will run once and go away.
    This can be a good thing. When I want to run something in parallel on Windows, I can use dbms_scheduler
    to schedule a certain number of jobs, each will go away when they finish.

    If you want to run this job on a particular schedule, then you should specify that in the job. The program
    should remain though. You may want to look at the views that show details about the jobs being run in
    the database.

    http://www.oradev.com/dbms_scheduler.jsp

Posting Permissions

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


Click Here to Expand Forum to Full Width