简体   繁体   中英

Schedule task after certain time when another task finishes execution

I am working on spring framework based application.

I have a requirement in which when user logs in to the system, then after certain time gap say 2 minutes or 5 minutes(which should be configurable), another task will start its execution. After that execution completed, result will be published on UI.

So, can anyone tell me the way to implement this in Spring framework.

I do not know if there is a specific way to do it in Spring. I usually exploit the JAVA SE 7 interface ScheduledExecutorService There are a lot of samples on the web. One of them is here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM