Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

Initiating an Autosys job from C#

$
0
0
Hi,
 
Has anyone ever started an autosys job from a C# console application?

Here is my code, it does not work.

// Start a process to execute a package and raise an event when done.  
                myProcess.StartInfo.FileName = "C:\\Program Files\\CA\\UnicenterAutoSysJM\\autosys\\bin\\" +  
                    "initautosys.exe";  
                myProcess.StartInfo.Arguments = "-i DEV -r 'SENDEVENT -EFORCE_STARTJOB -J" + packagePath +  
                    " -q0'";  
                myProcess.StartInfo.CreateNoWindow = true;  
                myProcess.EnableRaisingEvents = true;  
                myProcess.StartInfo.UseShellExecute = false;  
                myProcess.Exited += new EventHandler(myProcess_Exited);  
                myProcess.Start(); 



Executing a bat file with the following, works to start off the autosys job.

"C:\Program Files\CA\UnicenterAutoSysJM\autosys\bin\initautosys.exe" -i DEV -r "SENDEVENT -EFORCE_STARTJOB -JRunSSISPackage -q0" 
EXIT 

I need to start the autosys job from this program, the job starts off the execution of an SSIS package on another server. I then need to check the status of the job to determine if it failed or succeeded.

Don't forget to click "Mark as Answer" on the post that helped you. Anuja Ninan MCSD

Viewing all articles
Browse latest Browse all 8156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>