Skip to content

Instantly share code, notes, and snippets.

@ebot
Last active December 13, 2015 21:49
Show Gist options
  • Save ebot/4980444 to your computer and use it in GitHub Desktop.
Save ebot/4980444 to your computer and use it in GitHub Desktop.
import java.util.Date;
import com.siemens.directLine.edLink.database.JobInterface;
/*
* Created on Feb 18, 2013
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
public class Karl {
public static void main(String[] args) {
try {
JobInterface ji = new JobInterface("CL", "X0XX", 1, 1); // CL-X0XX-1-1
System.out.println(ji.getLastRun() + " - " + ji.getLastOutcome());
System.out.println("Firing off the job and waiting for idle");
ji.startJob();
while (true) {
if (ji.getJobStatus() == "Idle") {
System.out.println(new Date().toString() + " - "
+ ji.getLastOutcome());
}
else {
System.out.println(new Date().toString() + " - " + ji.getJobStatus());
}
Thread.sleep(500); // Wait half a second and check again
}
}
catch (Exception e) {
System.err.println(e.getMessage());
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment