Since I ran into the same problem, I created a bean validator annotation for EJB timers.
Feel free to use it. For all those who do not want or can use bean validation, look at the regular expression in the CronField.java file to check their lines manually.
Regular expressions are for "ScheduleExpression" and not for "CronExpression", so my chosen name may seem a bit confusing.
If you have improvements or optimizations, send me a request for transfer or message.
The source is available in this repository .
Usage: public class Month {
@CheckCronField(CronField.MONTH) public String expression; ... }
A few more examples are available in the test folder in the same repository.
Bigal source share