SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Run program with dynamic parameters.

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Run program with dynamic parameters.
Author Message
Maurizio Zito



Joined: 10 May 2004
Posts: 1

Post Run program with dynamic parameters. Reply with quote

We are doing a software selection and we already have a schduler.
We want to change it, but we are not able to find how can the schduler run an executable with dynamic parameters.

For example, run "MyJob.exe" with command line parameters:
1. Config file name ("-C");
2. DataBase name ("-D").
3. Input file name ("-P"), the file wich triggered the job;
4. Output file path ("-P"), the path on wich write output file;

My command line should be:
"c:\MyJob.exe -Cc:\24x7\fileconfig.cnf -DNorthWind -Pc:\24x7\triggerfile2.txt -Pc:\24x7\"
(if the triggering file is "c:\24x7\triggerfile1.txt")
or
"c:\MyJob.exe -Cc:\24x7\fileconfig.cnf -DNorthWind -Pc:\24x7\triggerfile2.txt -Pc:\24x7\new"
(if the triggering file is "c:\24x7\triggerfile2.txt")

Yours sincerely,
Maurizio Zito.

Mon May 10, 2004 1:37 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7955

Post Re: Run program with dynamic parameters. Reply with quote

Here is an idea how this can be done
Create a script type job. For the job schedule select "when certain files exists" and for triggering files specify "c:\24x7\triggerfile1.txt,c:\24x7\triggerfile2.txt" (without quotes). For the job script enter the following

Dim file_found, boolean
Dim pid, number

FileExists "c:\\24x7\\triggerfile1.txt", file_found
If file_found, RUN_FIRST_FILE, RUN_SECOND_FILE

RUN_FIRST_FILE:
Run "c:\\MyJob.exe -Cc:\\24x7\\fileconfig.cnf -DNorthWind -Pc:\\24x7\\triggerfile2.txt -Pc:\\24x7\\", "", pid
Exit

RUN_SECOND_FILE:
Run "c:\\MyJob.exe -Cc:\\24x7\\fileconfig.cnf -DNorthWind -Pc:\\24x7\\triggerfile2.txt -Pc:\\24x7\\new", "", pid

: We are doing a software selection and we already have a schduler.
: We want to change it, but we are not able to find how can the schduler run an
: executable with dynamic parameters.

: For example, run "MyJob.exe" with command line parameters: 1.
: Config file name ("-C");
: 2. DataBase name ("-D").
: 3. Input file name ("-P"), the file wich triggered the job;
: 4. Output file path ("-P"), the path on wich write output file;

: My command line should be: "c:\MyJob.exe -Cc:\24x7\fileconfig.cnf
: -DNorthWind -Pc:\24x7\triggerfile2.txt -Pc:\24x7\"
: (if the triggering file is "c:\24x7\triggerfile1.txt")
: or
: "c:\MyJob.exe -Cc:\24x7\fileconfig.cnf -DNorthWind
: -Pc:\24x7\triggerfile2.txt -Pc:\24x7\new"
: (if the triggering file is "c:\24x7\triggerfile2.txt")

: Yours sincerely,
: Maurizio Zito.

Mon May 10, 2004 2:00 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.