I could track the status of job using :
while (true){ClassAd ad = new ClassAd(schedd.getJobAd(cluster, job).getItem());int status = Integer.valueOf(ad.get("JobStatus"));
System. out.println("Job is " + status+":"+statusName[status]); if(status==4)// running{{ FileInfoArray files2 = xact.listSpool(cluster, job); for (FileInfo file : files2.getItem()) { xact.getFile(cluster, job, file.getName(), Integer.valueOf((int) file.getSize()), new File(file.getName()));
} xact.closeSpool(cluster, job); break;
}
}
But the jobstatus prints as completed even though the job is still running.
Also listSpool method gives an Invalid Transaction exeption.
Is there a way to solve this and get the output file back from the spool.
Thanks,
D --- On Wed, 3/25/09, Debolina Ray <talk2roon@xxxxxxxxx> wrote:
|