0
0

More than 3 years have passed since last update.

Play framework の scheduled jobs と crontab

Last updated at Posted at 2020-02-03

play framework では、ある処理を定期実行できる Jobクラスがありその間隔は以下のように @On() のカッコ内に書く


import play.jobs.Job;
import play.jobs.On;

@On("*/2****")
public class xxxxx extends Job<Void>

時間間隔の設定にはcrontabの表記が使えて、以下のサイトがめちゃわかりやすい。

https://crontab.guru/#/15_*_

※後ろのアスタリスク(*)は間にスペースが必要なことに注意。

crontab コアンド初めて知ったが、めちゃクチャ便利では

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0