playframework 2.0 - Continuously-running code in Java Play! Framework -


in play!-framework, code triggered requesting url server. thing is, need have code in background running continuously start-up, polling database new entries every few minutes, if normal program main() function. far can tell way run code navigate url, that's not want here. way accomplish this?

sounds want use kind of cron task (correct me if i'm wrong)

in play 2.x it's done akka's scheduler mentioned in the docs

even more informations and/or samples can find on original akka's docs

in general: in play can schedule task in onstart() method of global class , repeat in desired duration long required.

edit: of course akka built-in play 2.x beginning, play built on top of akka ;)


Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -