I agree, that needs more documentation.
Basically, a Job can contain one or more Tasks. If you look at the Job property Tasks it is a List<TaskClass>. But when using the API you don't have to care about this.
This example is taken from the TestClient in the API folder:
// create JobClass
JobClass j = new JobClass();
// set name of Job
j.Name = "ExecuteJob";
// add description to Job
j.Description = "Job that performs an Execute";
// create task
TaskClass tc = j.AddTask(TaskClass.TaskT.Execute);
// set name of Task
tc.Name = "Runs notepad.exe";
// set Execute settings of task
// set path to executable
tc.Execute.CmdLine = @"c:\windows\notepad.exe";
// set arguments
tc.Execute.Arguments = string.Empty;
// set working directory
tc.Execute.WorkingDirectory = string.Empty;
// send Job to Server
s.Jobs.Add(j);
Do you want to execute locally or remotely?
Edited by user
2009-09-10T22:47:47Z
|
Reason: Not specified