Advertisement
Guest User

Untitled

a guest
May 6th, 2015
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. package jobs;
  2.  
  3. import play.Logger;
  4. import play.jobs.Every;
  5. import play.jobs.Job;
  6.  
  7. @Every("1min")
  8. public class TestJobWithException extends Job {
  9.  
  10. static int count = 0;
  11.  
  12. /**
  13. * Here you do the job
  14. */
  15. @Override
  16. public void doJob() throws Exception {
  17. if (count++ == 3) {
  18. throw new Exception("Bye Bye Job");
  19. } else {
  20. Logger.debug("TestJobWithException launch #%s", count);
  21. }
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement