Created
October 26, 2015 12:57
-
-
Save rangalo/ee5cb76e5b09befb17ce to your computer and use it in GitHub Desktop.
EJB timer
This file contains 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
package com.firstscope.asynchronous; | |
import javax.ejb.Schedule; | |
import javax.ejb.Singleton; | |
import javax.ejb.Startup; | |
/** | |
* @author: hardik | |
* @since: 26.10.15. | |
*/ | |
@Singleton | |
@Startup | |
public class Scheduler { | |
@Schedule(second = "*/3", minute = "*", hour = "*") | |
public void doWork() { | |
System.out.println ("Timer called"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment