Play 1 では、単純に次のようになりました。
@Every(value = "1h")
public class WebsiteStatusReporter extends Job {
@Override
public void doJob() throws Exception {
// do something
}
}
Play 2.1 に相当するものは何ですか?
Play が akka を使用していることは知っており、次のコード サンプルを見つけました。
import play.api.libs.concurrent.Execution.Implicits._
Akka.system.scheduler.schedule(0.seconds, 30.minutes, testActor, "tick")
しかし、Scala初心者なので、どのように機能するのかわかりません。誰かが完全で実用的な例 (エンドツーエンド) を提供できますか?