Hi ,
I have a requirement to create a CGI page , where i have to execute a set of perl scripts in sequence.
If A,B,C,D are the perl scripts to be executed in sequence. 'B' should be started only if 'A' script succeeds.
I am planning to use Net::OpenSSH module for this.
Couple of questions in my mind for which i don't have answer.
When script is getting executed , I think it would be wise to let the user know of whats happening in the background. Would it be possible to capture the script output and send it back to cgi page .
Be it success/failure , the script should send the log output to the cgi page for the user view. In addition , when it is success , script should trigger the next script in sequence as well.
But I am not sure, how to capture the output and exit status and based on the result trigger the next script in sequence
I feel a html table like one shown below, to display the execution progress would be good.
| SCRIPT_NAME |
STATUS |
LOG |
| A |
Success |
click_here |
| B |
Inprogress |
Inprogress |
Apache server is setup in such a way , anyone who runs the script , it will executed as one common user. So there won't be a problem of permissions.
Other than this , to my knowledge , I don't see any other issue that I have to address. But my instincts say there might be few other things that i am missing .
Can someone please give me some heads up on this.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.