clusterGroup = clusterManagementService.createGroup("Test group");
clusterNode1 = clusterManagementService.createNode(clusterGroup.getId(), "10.2.0.1", "Node 1", true);
clusterNode2 = clusterManagementService.createNode(clusterGroup.getId(), "10.2.0.2", "Node 2", true);
clusterNode3 = clusterManagementService.createNode(clusterGroup.getId(), "10.2.0.3", "Node 3", true);
ScheduleJobCreateParameters jobParameters = new ScheduleJobCreateParameters();
jobParameters.setName("Test Job");
jobParameters.setDescription("Nothing to do");
jobParameters.setTimezone("UTC");
jobParameters.setCron("0 0 0 * * ?");
jobParameters.setEnabled(true);
jobParameters.setClusterGroupId(clusterGroup.getId());
jobParameters.setScheduleGroupId(scheduleGroup.getId());
jobParameters.setStrategy(ScheduleExecutionStrategy.CIRCULAR);
jobParameters.setActionIdentifier("action.type");
jobParameters.setActionDefinition("action.data".getBytes());
scheduleJob = scheduleJobManagementService.createJob(jobParameters);
// Disable Quartz job manually to prevent the firing from Quartz
quartzManagementService.disableJob(scheduleJob.getId());