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?

Cron expression

0
Last updated at Posted at 2022-10-12

まとめページに戻る
まとめA~M


標準でない方法 Apexの中で設定する

I'm executing Cron expression that runs a class after 7 days of the current date

1回だけ7日後に起動させたい。

ScheduleSurveyEmail m = new ScheduleSurveyEmail();
       Date dt = system.today().addDays(7);
       string sch = '0 0 0 '+dt.day()+' * ?';
        String jobID = system.schedule('Schedule Job', sch, m);

関連資料

曜日を指定しているので、月のところは?にする必要があると思います。


特定の値を指定しません。
「任意」として読み取られます。

Day_of_month と Day_of_week のみで使用され、どちらか一方の値を指定します。

https://help.salesforce.com/s/articleView?id=analytics.reports_subscription_reporting_cron.htm&type=5

https://salesforce.stackexchange.com/questions/221674/chron-help-system-stringexception-and-day-of-month-parameter-not-implemented

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?