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.
|