Hi, Guillaume
Sorry to send back too late, because I've got involved in a kind of
trouble shooting on my day-job.... ;-)
Anyway, I wrote a tiny patch for play-1.1 JobsPlugin as below link.
http://gist.github.com/547537
I was not sure why the statement "if(value.startsWith("cron."))..."
was eliminated from @Every section in afterApplicationStart method,
but not from @On section in scheduleForCRON method, I added the
statement onto @Every section.
But, I wonder it is better to eliminate the statement from @On section
than that.
I think play.libs.Expression suggest it is better.. and using "$
{cron.something}" value is rather better too.
Do you think?
And also I want to take a patch for play-1.0.x as below.
http://gist.github.com/547437
Thanks,
ikeike443
> I think that it would be better than @Cron and @Every support the '0'
> or 'never' value. If you can patch the JobsPlugin in the 1.1 branch to
> do that, I will integrate it for the next release.
>
>
>
>
>
> On Wed, Aug 11, 2010 at 2:00 PM, ikeike443 <
ikeike...@gmail.com> wrote:
> > Or shoud I write another plugin?
>
> > On 8月11日, 午後8:46, ikeike443 <
ikeike...@gmail.com> wrote:
> >> Hi,
>
> >> I would like tohandlemyjobexecution On/Off, then I read framework
> >> code such as play.jobs.JobsPlugin, play.libs.Time and so on.
> >> I knew it is able tohandlejobschedule over application.conf as
> >> Calimoucho do, set string start with prefix "cron".
>
> >> I tried to set "cron.interval=0min" for turn offjobexecution, of
> >> course it was annotated "@Every("cron.interval")".
> >> But I was caught by Exception from
> >> java.util.concurrent.ScheduledThreadPoolExecutor becauce it was
> >> prohibited to set 0 value to delay variable.
>
> >> Is there another way? Or Is it scheduled on Playframework's road map
> >> tohandleJobexecution On/Off over application.conf?
> Guillaume Bort,
http://guillaume.bort.fr
> write
guillaume.b...@gmail.com