ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From the_palakkaran <jik...@suntecsbs.com>
Subject How to schedule and ignite service to run every 5 seconds?
Date Mon, 08 Oct 2018 05:13:11 GMT
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