Last active
December 13, 2015 21:49
-
-
Save ebot/4980444 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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