Discussion:
scheduled services stops - @Scheduled(fixedDelay=1800000)
sommeralex
2012-07-30 17:48:22 UTC
Permalink
hi!

I have defined a schedule job within my service class, which seems to STOP
after some calls.

@Scheduled(fixedDelay=1800000) // 30min 1800000
public void deleteOutdatedWeatherEntries() {
System.out.println("clean cache:" + new Date());
logger.info("CLEAN-UP TASK: Delete outdated entries.");
myDAO.deleteEntries();
}

The console prints every 30min the logger info & System.out.print - but,
after some time, it stops. there is no output anymore and the DB is not
deleted anymore.

I know that this is a spring issue, but maybe someone has an answer.
instead, i could try the same with @Startup public static void scheduleJobs.

But anyway, i wonder why the service stops..



--
View this message in context: http://tapestry.1045711.n5.nabble.com/scheduled-services-stops-Scheduled-fixedDelay-1800000-tp5714882.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@tapestry.apache.org
For additional commands, e-mail: users-***@tapestry.apache.org
Lenny Primak
2012-07-30 19:44:51 UTC
Permalink
I bet some uncaught exception kills the job... Just a guess
Post by sommeralex
hi!
I have defined a schedule job within my service class, which seems to STOP
after some calls.
@Scheduled(fixedDelay=1800000) // 30min 1800000
public void deleteOutdatedWeatherEntries() {
System.out.println("clean cache:" + new Date());
logger.info("CLEAN-UP TASK: Delete outdated entries.");
myDAO.deleteEntries();
}
The console prints every 30min the logger info & System.out.print - but,
after some time, it stops. there is no output anymore and the DB is not
deleted anymore.
I know that this is a spring issue, but maybe someone has an answer.
But anyway, i wonder why the service stops..
--
View this message in context: http://tapestry.1045711.n5.nabble.com/scheduled-services-stops-Scheduled-fixedDelay-1800000-tp5714882.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@tapestry.apache.org
For additional commands, e-mail: users-***@tapestry.apache.org
sommeralex
2012-07-31 07:57:22 UTC
Permalink
i am no using the chron job. which works.. thx.



--
View this message in context: http://tapestry.1045711.n5.nabble.com/scheduled-services-stops-Scheduled-fixedDelay-1800000-tp5714882p5714914.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@tapestry.apache.org
For additional commands, e-mail: users-***@tapestry.apache.org

Loading...