Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
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
Medium Priority
?
351 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 16

Accepted Solution

by:
CuteBug earned 2000 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

636 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