Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cron Job in play framework 2.0 [closed]

How to schedule tasks by cron expressions in Play Framework 2.0?

Equivalent to Play 1's @On("<enter cron expression here>") annotation

like image 844
user1394879 Avatar asked May 14 '12 23:05

user1394879


1 Answers

In Play 2.0 job scheduling is done with Akka:

http://www.playframework.org/documentation/2.0.1/JavaAkka see section Scheduling asynchronous tasks

You can also use Global object to perform your actions while the application start/stop

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

like image 128
biesior Avatar answered Nov 11 '22 02:11

biesior