Hello!
Here is some code that will schedule a workflow with the specified ID. In this case, it's just passing in one parameter, hostname. It's scheduling the workflow according to the "date" parameter.
My question is, is there a way to pass in a schedule description? Or even a name? In the screenshot below, I manually updated the schedule description to contain "test", but I'd like to pass in a description (or name) in an automated fashion. I appreciate any help!
var workflowToLaunch = Server.getWorkflowWithId("41392622-b385-4124-9b9b-15a99ddb794c");
if (workflowToLaunch == null) {
throw "Workflow not found";
}
var workflowParameters = new Properties();
workflowParameters.put("hostname",hostname);
var scheduledTask = workflowToLaunch.schedule(workflowParameters,date);
