Hi Henrik,
Thanks for the beta changes but I'm still having no luck with passing variables. I have changed the test to make it more visible to me if the code works - I now have a job that creates a folder. The code (I have not included the connection code as I know this works) is below.
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim jobs As Jobs = s.Jobs
Dim jobToRun As JobClass = jobs.GetJobByName("TestJob")
jobs.JobVariables.AddUpdate("{JOB(Active,Variable,param1)}", "param1", "c:\aaaa")
If jobToRun Is Nothing Then
TextBox1.Text = "Cannot find job"
Else
jobs.Run(jobToRun, False)
TextBox1.Text = "Jobby found"
End If
End Sub
The job runs but the variable param1 does not get updated and so the task to create the folder fails. If the job is run from the VisualCron client (with a value in the variable) it works. Any further thoughts or ideas on a different syntax?
I have also tried setting up a jobVariableClass and setting the key as "param1" and running the method variableUpdate(instance of jobVariableClass). This updates the variable in the job but I see nowhere to update the value of this variable.
regards
Nigel J Hartley
Edited by user
2014-09-03T13:03:11Z
|
Reason: Not specified