ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ilya Kasnacheev <ilya.kasnach...@gmail.com>
Subject Re: How to schedule and ignite service to run every 5 seconds?
Date Mon, 08 Oct 2018 08:26:06 GMT
Hello!

ignite-schedule works with CRON expressions and cron4j underneath, which
does not support granularity finer than one minute.

Regards,
-- 
Ilya Kasnacheev


пн, 8 окт. 2018 г. в 8:13, the_palakkaran <jikkuj@suntecsbs.com>:

> The default scheduling happens every 1 minute. Is it possible to override
> it
> and make it every 5 seconds?
>
> SchedulerFuture<?> schedulerFuture = ignite.scheduler().scheduleLocal(
>                         new Callable<Integer>() {
>                             private int invocations = 0;
>
>                             @Override
>                             public Integer call() {
>                                 invocations++;
>                                 ignite.compute().broadcast(
>                                     new IgniteRunnable() {
>
> @Override public void run() {
>
>       System.out.println("Running");
>                                         }
>                                     }
>                                 );
>                                 return invocations;
>                             }
>                         },
>                         "{5, 3} * * * * *" // Cron expression.
>                     );
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Mime
View raw message