Home » SQL & PL/SQL » SQL & PL/SQL » Running Executable file through dbms_scheduler job
Running Executable file through dbms_scheduler job [message #317426] Thu, 01 May 2008 03:19 Go to next message
sarwagya
Messages: 87
Registered: February 2008
Location: Republic of Nepal
Member
Hi All,

I am using Oracle 10g Release 2. I tried to create a job that calls an executable shell script file
as below:
begin
    dbms_scheduler.create_job(
        job_name => 'TEST_EXEC_JOB'
        ,job_type => 'EXECUTABLE'
        ,job_action => '/bin/bash /home/oracle/sarwagya/exec.sh'
        ,start_date => '04-Apr-08 03:15:00 PM'
        ,repeat_interval => 'FREQ=MINUTELY; INTERVAL=1;'
        ,enabled => TRUE
        ,comments => 'Test job for running an executable file.');
end;

The content of the executable file is :
#!/bin/bash
touch /home/oracle/sarwagya/test_log.txt
echo `date` >> /home/oracle/sarwagya/test_log.txt

But, the file test_log.txt is not created.

The follwing query suggests that the job is running every minute.
select job_name,to_char(last_start_date,'hh24:mi:ss') last_start, last_run_duration,to_char(next_run_date,'hh24:mi:ss') next_run,flags from user_scheduler_jobs;
JOB_NAME                       LAST_START LAST_RUN_DURATION NEXT_RUN FLAGS
------------------------------ ---------- ----------------- -------- -------
TEST_EXEC_JOB                  13:01:00   +000000000        13:02:00 2099280

Please suggest what is the problem.
Also, can we find out anything with the help of FLAGS?

Thanks.

[Mod-Edit: Frank added code tags.]

[Updated on: Thu, 01 May 2008 08:02] by Moderator

Report message to a moderator

Re: Running Executable file through dbms_scheduler job [message #317455 is a reply to message #317426] Thu, 01 May 2008 07:50 Go to previous message
rajatratewal
Messages: 507
Registered: March 2008
Location: INDIA
Senior Member
check job_queue_processes parameter.
Previous Topic: Can not see data in GTT although in same session
Next Topic: Master Detail with Connect by
Goto Forum:
  


Current Time: Fri Dec 09 00:24:33 CST 2016

Total time taken to generate the page: 0.31406 seconds