none
submit job through job xml file via API RRS feed

  • Question

  • Hi,

      I have managed to submit job by job xml file via API, but i can not get this type of job's task information.

      ISchedulerJob newJob = m_HpcScheduler.CreateJob();

      newJob.RestoreFromXml(sJobXmlFile);

      ISchedulerTask task = newJob.OpenTask(m_HpcScheduler.CreateTaskId(1)); //this will throw an exception

      In HPC Cluster Manager, it can config new job by "Create new job from description file" method and can change the task properties before submit.

      Can anyone know how to change new task properties whose parent job is from job xml file?

    Thanks,

    Monday, September 6, 2010 8:29 AM

Answers

All replies

  • Hi,

    If you want to use OpenTask() method, you need to first add your new job to scheduler database by invoking something like:

    m_HpcScheduler.AddJob(newJob);

    This will create new job in configuring state, which you can modify.

    Let me know if it worked for you and if you have any other questions.

    Thank you,
    Łukasz Tomczyk

    Tuesday, September 7, 2010 4:22 PM
  • Hi, thank you for reply, this informatiion is very helpful. But I use the "GetTaskList" method to get job task.

    Thanks,

    Jinyan Gao

    Wednesday, September 8, 2010 12:58 AM
  • Hi,

    Yes, GetTaskList will work locally, before adding job to the scheduler, however filtering will not work.

    From http://msdn.microsoft.com/en-us/library/microsoft.hpc.scheduler.ischedulerjob.gettasklist(VS.85).aspx :

    If you call the GetTaskList method before you add or submit the job to the cluster, the filter properties that you specify in the filter parameter do not get applied, and the method returns all of the tasks in the job.

    Thank you,
    Łukasz Tomczyk

    Wednesday, September 8, 2010 4:02 PM