CenturionX (darwinbaldrich (AT) gmail (DOT) com) wrote:
: Hello Sybrand,
: Thanks for respond.
: I'll change the question.
: I'm working with Oracle 10.2.0.4.0 on Windows.
: I created a job to execute a .bat file
: JOB:
: ---------
: begin
: dbms_scheduler.create_job (
: job_name =>'DEL_ALERT_LOG',
: job_type =>'executable',
: job_action =>'c:\windows\system32\cmd.exe /c H:\Reports\Programs
: \wip_inventory_dbp.bat > nul',
: enabled => true,
: auto_drop => true
: );
: commit;
: end;
: /
: .BAT file
: -------------
: :

ELETE OLD LOG FILE
: DEL wip_inventory_dbp.log
: ::GENERATE REPORT
: ECHO. >> wip_inventory_dbp.log
: ECHO Generating report... >> wip_inventory_dbp.log
: ECHO. >> wip_inventory_dbp.log
: sqlplus cms/cms@LEGACY_JACKSONVILLE_DEV @H:\Reports\Programs
: \wip_inventory.sql
: The only thing that executes right is the sqlplus command, The rest:
: del, echo, doesn't work (just DOS commands does nothing).
: How can i fix it.
: I need a log file to follow the process and i need to add more dos
: commands in the script.
: Thanks for your help.
I would guess that the bat file needs to set a useable current directory
before trying to run the commands. If the Reports dir was a good location
(which I doubt, but what the heck) then something like
:

ELETE OLD LOG FILE
H:
chdir H:\Reports\Programs
DEL wip_inventory_dbp.log
...etc...