none
HPC Dependent Tasks for Failure Path RRS feed

  • Question

  • Is there a way to set up dependent tasks based on the success/failure of the prior task?  So if task "A" succeeds then perform task "B", however if it fails perform task "C"?  All I can figure out is the successful path using the ISchedulerTask.DependsOn approach.

    I assume there isn't, but though I would ask in case others have come up with a solution.

    Thanks!


    Scott
    Monday, June 28, 2010 6:55 PM

Answers

  • Hi Scott,

    I am not aware of a way to do that. One way that may help

    1) create N >= 4 tasks. Make sure the N tasks can run sequencially by setting up min/max resources units.

    2) Add a dummy task TaskD after Task A that'll sleep for X seconds. e.g. X=10 seconds.

    3) Write a program that will check TaskA's status while the job is running TaskD. Then modify the task's dependsOn property so that either TaskB or TaskC can be the dependencies of taskA, depending on whether taskA is success or fail.

    Hope this can help

    Liwei

    Tuesday, June 29, 2010 12:01 AM