EE6 @Schedule Timer Service on JBoss AS 7.1

It seems that @Schedule methods won’t execute on JBoss AS7.1 unless you specify at least both the hours and minutes values on the scheduled method.

For example, to execute a method every 30 seconds:

@Schedule(seconds="*/30")
public void doSomething() { ...}

Doesn’t execute, but if you include hours and minutes wildcards too then it does:

@Schedule(hour="*", minute-="*", second="*/30")
public void doSomething() { ...}

2 Replies to “EE6 @Schedule Timer Service on JBoss AS 7.1”

  1. hour, second and minute all default to 0 so your first and second example are not equivalent. @Schedule(hour=”0″, minute-=”0″, second=”*/30″) is what you get from the first example and it only fires around midnight.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.