java – Cron Job in play framework 2.0

How to schedule tasks in play framework 2.0 through cron expressions?

Equivalent to @ on ("< enter cron expression here >") comment of play 1

Solution

In play 2.0, job scheduling is completed with akka:

http://www.playframework.org/documentation/2.0.1/JavaAkka See scheduling asynchronous tasks

You can also use global objects to perform your actions when the application starts / stops

http://www.playframework.org/documentation/2.0.1/JavaGlobal

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>