Jobs: JSON Object

について 求人 object in your jobs.config file is structured as follows:

コピー
1
PropertyタイプRequired
ファンクションロケーションStringはい
関数名Stringはい
記述Stringいいえ
実行設定Objectはい

ファンクションロケーション

Path to the backend file that contains the function you want to run at the scheduled time. The function location is a relative path within the Backend folder. The function can be in any backend .js, .jsw or .web.js file.

関数名

Name of the function to run at the scheduled time.

Note: Make sure you export the function that you want the job scheduler to run.

記述

Optional description of the job.

実行設定

Object that contains information about when the job should run, using either a cron expression or time configuration properties.

注釈

  • All times in job configurations are UTC time. To calculate the UTC equivalent of your local time, find your location's UTC time offset. Then either add or subtract to your local time based on the offset.
  • The job will run within 5 minutes after the specified time.
  • Jobs occurring more than once a day must be defined with a cron expression.
  • Most site plans only allow jobs to run at a minimum interval of 1 hour. If you need to add more jobs or run them more frequently, you can upgrade your site.
  • If both methods below are added to a single 実行設定 object, only the cron expression will be triggered.

cronExpression

Use a cron expression as a single property in the 実行設定 オブジェクトがある。

For example, to run a job every day at 8:00 in the morning, use:

コピー
1

時間, 曜日, 日付月

Use multiple properties, 時間, 曜日, 日付月, to schedule the job. 時間 is the only required property with this method. If a job includes both 曜日 そして 日付月 it creates an error and the job will not run.

  • 時間 The time of day the job runs. The time is specified as UTC time in HH:MM format.
  • 曜日 One of: Sunday, 月曜日, Tuesday, Wednesday, Thursday, Friday, or Saturday
  • 日付月 Number between 1 そして 31.

For example, to run a job every Sunday at 8:00 in the morning, use:

コピー
1
役に立ちましたか?
はい
いいえ