This code works for me:
Client c = new Client();
c.LogToFile = false;
Connection conn = new Connection();
conn.Address = "SERVER";
conn.UserName = "admin";
conn.PassWord = "";
conn.Port = 16444;
conn.ConnectionType = Connection.ConnectionT.Remote;
s = c.Connect(conn, true);
//while (!s.Connected)
System.Threading.Thread.Sleep(4000);
JobClass j = s.Jobs.Get("fc205639-ed67-4aee-9a29-2defe3e2231b");
s.Jobs.Run(j);
while (j.Stats.Status.ToString() != "Running")
System.Threading.Thread.Sleep(10);
while(j.Stats.Status.ToString() == "Running")
System.Threading.Thread.Sleep(100);
c.Disconnect(s);
Edited by moderator
2013-01-07T17:04:08Z
|
Reason: Not specified