Howto access crypted content of a Job Variable ? - VisualCron - Forum

Community forum

klr
  •  klr
  • No customer Topic Starter
2014-07-29T09:35:59Z
I am trying to get content of a Job Variable using the API in C#, but it seems to be encrypted...

JobClass MyJob = s.Jobs.GetJobByName("MyJobName");
var TimeFunctiona = MyJob.GetJobVariable("myjobvar").ValueObject;

gives a byte array of the correct length, but I can not figure out how to convert the byte array to the correct variable content. It seem to be encoded.

How can I decode this ?

Regards
/Klaus
Support
2014-07-30T16:23:58Z
We added this for the 7.2.0 beta which you can download here:

http://www.visualcron.co....aspx?g=posts&t=4259 

Here is a sample:

using System;
using VisualCron;
using VisualCronAPI;

public class Test
{
 public static string ConnectMe()
 {
 	Client c = new Client();
 	Connection conn = new Connection();
 	Server s = c.Connect(conn,true);
 	// add or update
 	s.Jobs.JobVariables.AddUpdate("{JOB(Active|Id)}","testkey","testvalue47");
 	// get Job Variable value
 	string value = s.Jobs.JobVariables.GetValue("{JOB(Active|Id)}","testkey");
 	// delete Job Variable
	s.Jobs.JobVariables.Delete("{JOB(Active|Id)}","testkey");
	return value;
 }
}

Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
klr
  •  klr
  • No customer Topic Starter
2014-07-31T07:10:45Z
Looks great, but what key is used if the JobVariable is added in the VisualCron Client application ?

Regards
/Klaus
Scroll to Top