locked
What would be the best way to resubmit a task from the client in a batch application RRS feed

  • Question

  • Hi,

    I've been coding a batch application for HPC Cluster, and from the client I can see when tasks fail using job.GetTaskList(failedTasksFilter, null, true);

    These tasks could fail for reasons unrelated to HPC Cluster, and in some cases I might want to resubmit them, for example for tasks that communicate with an unreliable network resource I might want to give them as a parameter a certain timeout, and if they fail, try with a larger one.  I know that I should be using SOA for this, but in the particular case I'm investigating that's not possible (the service code won't run as a WCF service).

    Can I append somehow these tasks to a job that has already been submitted? Or do I need to create a new job? Is there anything else I could look at?

    Thanks,Alberto

    Tuesday, September 11, 2012 1:18 AM

Answers

  • in that case you'll need to monitor the task status and resubmit it. you can re-use the current job if it's still running. you can set the "run until cancel" flag of the job so that it'll keeps running.
    Wednesday, September 12, 2012 2:42 AM

All replies

  • in that case you'll need to monitor the task status and resubmit it. you can re-use the current job if it's still running. you can set the "run until cancel" flag of the job so that it'll keeps running.
    Wednesday, September 12, 2012 2:42 AM
  • Ok, that works but only using the "run until cancel" flag, otherwise the last tasks to be requeued never get a chance to run again.

    If I set the "run until cancel" flag, is there any way of getting the job to show as finished when there are no more queued tasks?

    Alternatively, can I change the "run until cancel" flag after submitting the job? That way I could set it only when tasks fail and need to be submitted, and I could tell apart jobs where tasks never failed, which show as "Finished" from tasks with requeued tasks, which my code would cancel when all the tasks are finally successful.

    Wednesday, September 12, 2012 3:51 AM
  • I just need to use job.Finish() when all my tasks finish successfully.
    Wednesday, September 12, 2012 3:58 AM
  • yes, job.Finish() will do.
    Thursday, September 13, 2012 3:09 AM