Community forum

Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


Burak Akkor
2015-01-08T14:04:41Z
Hello,

I'm using 7.5.1 and I have a question.

Basically I want to pass variables to job and trigger it.

Here is the sample;


using System;
using VisualCron;
using VisualCronAPI;

public class Test
{
 public static string TestTrigger(string jobId)
 {
  List<global::VisualCron.JobVariableClass> variables = new List<global::VisualCron.JobVariableClass>();
  variables.Add(new global::VisualCron.JobVariableClass() { Key = "Triggered", ValueObject = System.Text.Encoding.Default.GetBytes("test@test.com") });
  VisualCronServer.Jobs.Run(jobId, bolCheckConditions: true, bolSynchrous: true, lstJobVariables: variables, bolUpdateJobVariables: false);
 }
}



But this is not working actually or am I doing something wrong? I don't want to add or update job variables which I can easily do that through API. I just want to send my dynamic variables to task and trigger it with one time variables.

When I try to get that variable value from VC like {JOB(Active,Variable,Triggered)} is returns to me not found.

And secondly what encoding type is using in VC variables?

Thanks already,
Burak
Sponsor
Forum information
Guest
2019-10-31T13:19:54Z
Hello, is it possible, and if yes, how to pass job variables while starting job in VisualCron by URL? As a example, if I want to start job http://localhost:8001/VisualCron/xml/Job/Run?id=0845127e-ac0d-486e-8b49-82b145519f93, how can I set job variable/s? 😲

Thank you in advance!
Scroll to Top