Solved

How can I have my c# code run a perl script and know when the script has been completed

Posted on 2008-06-25
1
342 Views
Last Modified: 2008-06-27
I have a perl script that compiles a bunch of data...I want to be able to fire off that script as a part of a larger routine..So I need to figure out how to A run the perl script inside the c# app but compiling the data takes about 15 minutes..so I need a way to have the app be able to identify when the script has completed and then continue running the rest of its routine.


The c# app is running as a web service

0
Comment
Question by:Prysson
1 Comment
 
LVL 16

Accepted Solution

by:
CuteBug earned 500 total points
ID: 21866112


ProcessStartInfo ps = new ProcessStartInfo("perl.exe", "program.pl args");
ps.UseShellExecute = false;
ps.RedirectStandardOutput = true;
Process p=new Process();
p.Start(ps);
string output = p.StandardOutput.ReadToEnd();
p.WaitForExit();

Open in new window

0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question