0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

1日に複数回に渡って同じスケジュールフローを起動させる方法

0
Last updated at Posted at 2025-12-14

使っているクラウドなどの小ネタ Advent Calendar 2025 15日目

ApexならSystem.scheduleを使って指定すれば、同じApexコードを複数回起動できます

この例では1時間に1回流します

chkLoginHistory s = new chkLoginHistory();
String sch = '0 02 * * * ?';
String jobID = System.schedule('chkLoginHistory', sch, s);

フローの場合はどうするんだろうかと...
できれば3回ほど流したいです。
フローからYoomに連携して、最終的にはジョブカンの汎用マスターを更新しているのですが、Yoom側で50レコードを超えるとロボットが停止します。

1回の処理を50レコード未満にして処理させているのですが、スケジュールフローは1日に1回しか流れないので、残りは翌日になってしまいます。実はそれで1日遅れて連携したので、少々不具合が生じました。

まぁ、1回あたり50件未満で処理しても、自動でフローが流れないとなぁ。

同じような質問がありますね。

あああ、思った通りだ... 面倒くさい

To do this you might want to have a sub-flow with the logic you want to run, and then three flows calling that sub-flow.

実行したいロジックを含むサブフローを作成し、そのサブフローを呼び出す3つのフローを用意するとよいでしょう。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?