use of org.ow2.proactive.scheduler.common.task.ScriptTask in project scheduling by ow2-proactive.
the class TestForkedTaskWorkingDir method scriptTask.
private void scriptTask() throws Exception {
File input = createTempDirectory("test", ".input_script", null);
File output = createTempDirectory("test", ".output_script", null);
FileUtils.touch(new File(input, "inputFile_script.txt"));
TaskFlowJob job = (TaskFlowJob) StaxJobFactory.getFactory().createJob(new File(TestForkedTaskWorkingDir.class.getResource("/functionaltests/descriptors/Job_forked_script_task_working_dir.xml").toURI()).getAbsolutePath());
job.setInputSpace(input.toURI().toString());
job.setOutputSpace(output.toURI().toString());
schedulerHelper.testJobSubmission(job);
assertTrue(new File(output, "outputFile_script.txt").exists());
}
use of org.ow2.proactive.scheduler.common.task.ScriptTask in project scheduling by ow2-proactive.
the class RunningTaskRecoveryWithDownNodeTest method submitJob.
private JobId submitJob() throws Exception {
TaskFlowJob job = new TaskFlowJob();
job.setName("JOB-" + RunningTaskRecoveryWithDownNodeTest.class.getSimpleName());
for (int i = 0; i < NUMBER_OF_TASKS; i++) {
ScriptTask st1 = new ScriptTask();
st1.setName(TASK_BASE_NAME + i);
st1.setScript(new TaskScript(new SimpleScript("Thread.sleep(60000)", "groovy")));
job.addTask(st1);
}
JobId jobid = schedulerHelper.submitJob(job);
schedulerHelper.waitForEventJobRunning(jobid);
return jobid;
}
Aggregations