Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I need to access a variety of networking equipment and start a debug log on each, then wait for an event on another server, then re-access the networking equipment to stop the debug mode, and finally collect the logs for upload to an FTP site. I am using the threads module but the details of the requirements have reached the point where I feel that some sort of scheduler is required.

I have a precedence list, such as used in a topo sort, to determine which tasks need to wait for which other tasks to complete before they can run. In all but one case, each task needs to wait for all of it's preceding tasks to complete before it can execute, however tasks can and should be executed in parallel when ever possible. Every example that I have found for using the threads module starts all possible tasks at the same time and waits for them all to complete before proceeding. This is not what I need to do, I have a "skein" of tasks to be executed. (The one exception to the wait-for-all rule is that I have two tasks that need to wait for either of them to finish instead of both. One of the tasks is grepping a remote log file looking for a match, the other task is waiting for the remote machine to crash. If either task finishes, the other should be aborted and I can continue with the next step.)

Can anyone point me to a package or code that accomplishes what I need to do? Many thanks.


In reply to A job scheduler for the threads module by samwyse

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-04-19 02:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found