quality@glassfish.java.net

Re: Schedules , wow

From: Richard Kolb <rjdkolb_at_gmail.com>
Date: Fri, 4 Dec 2009 08:28:51 +0200

Hi Ludo

2009/12/3 Ludo <Ludovic.Champenois_at_sun.com>

> Richard Kolb wrote:
>
>>
>> Hi Judy
>>
>> I just wanted to say a big thank you the the designers / implementers of
>> Java-EE 6 schedules.
>> Wow, it's amazing. Our company developed it's own fancy scheduler over the
>> last 5 years and this just deprecates it all. :)
>> The GlassFish scheduler is so simple and elegant.
>>
>> Just a comment on the Java docs, seem to some missing.
>>
>> http://java.sun.com/javaee/6/docs/api/index.html?javax/ejb/TimerService.html
>> http://java.sun.com/javaee/6/docs/api/javax/ejb/ScheduleExpression.html
>>
> What is missing there?
> Ludo
> I see these 2 pages...The 2nd could have more comments, but the api seems
> very simple...


Sorry this should have been there two pages:
( I will ask the questions someone reading the Java-Doc may ask)


*1) http://java.sun.com/javaee/6/docs/api/javax/ejb/Schedule.html*

hour is a String (is this 24 hour, 12 hour, should I put AM after the hour
?)
info is a String , what is that ?
timezone is a String , what is that ?
month is a String , can this be 1, Jan, January, jan etc ?
day is a String, I know it can't be Thur, it must be Thu ( I only found this
out by trial and error)


Some examples like 'man contab' would be great :

* # MIN HOUR DAY MONTH DAYOFWEEK COMMAND
       # at 6:10 a.m. every day
       10 6 * * * date

       # every two hours at the top of the hour
       0 */2 * * * date

       # every two hours from 11p.m. to 7a.m., and at 8a.m.
       0 23-7/2,8 * * * date

       # at 11:00 a.m. on the 4th and on every mon, tue, wed
       0 11 4 * mon-wed date

       # 4:00 a.m. on january 1st
       0 4 1 jan * date*


*2) http://java.sun.com/javaee/6/docs/api/javax/ejb/ScheduleExpression.html*

ScheduleExpression ScheduleExpression::end(java.util.Date e) , what is that,
how do I use this ? Why does it return another instance of
ScheduleExpression ? Should this be static ?

ScheduleExpression second(int s), what is that ? Why does it return another
instance of ScheduleExpression ? Should this be static ?

etc.


There are some great docs here :
http://docs.sun.com/app/docs/doc/820-7627/bnbpe?a=view


regards
Richard.