I'm studying the EJB and testing automatic function by create a simple EJB like below.
I hope it can run automatically once it's deployed.
import javax.ejb.Schedule;
import javax.ejb.Stateless;
@Stateless
public class TestAuto {
@Schedule(minute="*",hour="15")
public void testprint()
{
System.out.println("AutoWrite");
}
}
I run it at eclipse and it successfully deployed but I can't see any output at console. Can someone help? I used wildfly 11, java 1.8 and ejb 3.2. Thanks. Update: Now it worked. But how to pause it and restart?