I want to wait for a job to finish which has been submitted externally.
My first idea was to get the jobID by calling qstat
and then executing session.wait(jobID, Session.TIMEOUT_WAIT_FOREVER);
. But this doesn't work. Are there any other ideas except calling qstat
until the job isn't listed anymore?
Can you explain exactly what doesn't work about
session.wait(jobId, Session.TIMEOUT_WAIT_FOREVER)
? That would also be my inclination and allows you to retrieve the job's return code.There's something here that might be relevant; it suggests using
synchronize
instead ofwait
:Otherwise, I'd you could add something to the job to record / signal its completion?