年次Cronの更新(週タイプ)
説明
このAPIを使用すると、プロジェクトに存在する年次cron(月の週を使用して定義)を更新できます。更新するcronは、名前やIDなどの一意の識別子を使用して参照されます。
注意:
-
このAPIでは、サンプルリクエストとサンプルレスポンスをJob Functionで説明しています。APIの機能は、webhook、Circuits、およびAppSailのジョブでも同様です。
-
月の日付を使用して定義された年次cronを更新する場合も、APIの機能は同じです。年次Cronの作成(日付タイプ)APIを参照してください。
リクエスト詳細
リクエストURL
{api-domain/}baas/v1/project/{project_id}/job_scheduling/cron/{cron_identifier(name/ID)}
リクエストヘッダー
Authorization: Zoho-oauthtoken {oauth_token}
Content-Type: application/json
オプションヘッダー
CATALYST-ORG: {org_id}
Environment: Development
スコープ
ZohoCatalyst.cron.UPDATE
リクエストJSON
以下に示す対応する値を含むJSONを送信する必要があります。
{
"cron_name": "recurCronYearlyWeek",
"description": "abc",
"cron_type": "Calendar",
"cron_status": true,
"end_time": 1719212399,
"cron_execution_type": "pre-defined",
"job_meta": {
"id": "10108000004280663",
"job_name": "jobName",
"job_config": {
"number_of_retries": 2,
"retry_interval": 1000
},
"target_type": "Function",
"target_details": {
"id": "10108000003823893",
"target_name": "target_function_fetch"
},
"source_type": "Cron",
"source_details": {
"id": "10108000004280661",
"source_name": "recurCronYearlyWeek",
"details": {
"cron_execution_type": "pre-defined"
}
},
"jobpool_id": "10108000003823563",
"jobpool_details": {
"type": "Function",
"name": "VendorReminder",
"created_by": {
"zuid": "77941453",
"is_confirmed": false,
"email_id": "emmy@zylker.com",
"first_name": "Amelia Burrows",
"last_name": "",
"user_type": "Admin",
"user_id": "10108000000009004"
},
"created_time": "May 28, 2024 04:44 PM",
"modified_by": {
"zuid": "77941453",
"is_confirmed": false,
"email_id": "emmy@zylker.com",
"first_name": "Amelia Burrows",
"last_name": "",
"user_type": "Admin",
"user_id": "10108000000009004"
},
"modified_time": "May 28, 2024 04:44 PM",
"capacity": {
"memory": "2048"
},
"project_details": {
"project_name": "ZylkerShipments",
"id": "10108000003823392",
"project_type": "Live"
},
"id": "10108000003823563"
},
"params": {
"param1": "value1"
},
"target_id": "10108000003823893"
},
"job_detail": {
"hour": 0,
"minute": 0,
"second": 0,
"repetition_type": "yearly",
"months": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11
],
"weeks_of_month": [
1,
3,
5,
"4"
],
"week_day": [
1
],
"timezone": "PST"
},
"id": "10108000004280661"
}
このリクエストJSONをリクエストボディに設定し、以下の値を指定する必要があります:
レスポンス詳細
JSONレスポンスは、更新されたcronのメタデータを返します。レスポンスには、cronを更新したユーザーの詳細も含まれます。
curl -X PUT \ https://api.catalyst.zoho.com/baas/v1/project/10108000003823392/job_scheduling/cron/10108000004280535
-H “Authorization: Zoho-oauthtoken 1000.91016.2f57”
-H “Content-Type:application/json”
--data-raw ‘{“cron_name”:“recurCronYearlyWeek”,“description”:“abc”,“cron_type”:“Calendar”,“cron_status”:true,“end_time”:1719212399,“cron_execution_type”:“pre-defined”,“job_meta”:{“id”:“10108000004280663”,“job_name”:“jobName”,“job_config”:{“number_of_retries”:2,“retry_interval”:1000},“target_type”:“Function”,“target_details”:{“id”:“10108000003823893”,“target_name”:“target_function_fetch”},“source_type”:“Cron”,“source_details”:{“id”:“10108000004280661”,“source_name”:“recurCronYearlyWeek”,“details”:{“cron_execution_type”:“pre-defined”}},“jobpool_id”:“10108000003823563”,“jobpool_details”:{“type”:“Function”,“name”:“VendorReminder”,“created_by”:{“zuid”:“77941453”,“is_confirmed”:false,“email_id”:“emmy@zylker.com”,“first_name”:“Amelia Burrows”,“last_name”:"",“user_type”:“Admin”,“user_id”:“10108000000009004”},“created_time”:“May 28, 2024 04:44 PM”,“modified_by”:{“zuid”:“77941453”,“is_confirmed”:false,“email_id”:“emmy@zylker.com”,“first_name”:“Amelia Burrows”,“last_name”:"",“user_type”:“Admin”,“user_id”:“10108000000009004”},“modified_time”:“May 28, 2024 04:44 PM”,“capacity”:{“memory”:“2048”},“project_details”:{“project_name”:“ZylkerShipments”,“id”:“10108000003823392”,“project_type”:“Live”},“id”:“10108000003823563”},“params”:{“param1”:“value1”},“target_id”:“10108000003823893”},“job_detail”:{“hour”:0,“minute”:0,“second”:0,“repetition_type”:“yearly”,“months”:[0,1,2,3,4,5,6,7,8,9,10,11],“weeks_of_month”:[1,3,5,“4”],“week_day”:[1],“timezone”:“PST”},“id”:“10108000004280661”}’
{
"status": "success",
"data": {
"cron_name": "recurCronYearlyWeek",
"description": "abc",
"cron_type": "Calendar",
"cron_execution_type": "pre-defined",
"job_meta": {
"id": "10108000004280844",
"url": "",
"job_name": "jobName",
"job_config": {
"number_of_retries": 2,
"retry_interval": 1000
},
"target_type": "Function",
"target_details": {
"id": "10108000003823893",
"target_name": "target_function_fetch"
},
"source_type": "Cron",
"source_details": {
"id": "10108000004280661",
"source_name": "recurCronYearlyWeek",
"details": {
"cron_execution_type": "pre-defined"
}
},
"jobpool_id": "10108000003823563",
"jobpool_details": {
"type": "Function",
"name": "VendorReminder",
"created_by": {
"zuid": "77941453",
"is_confirmed": false,
"email_id": "emmy@zylker.com",
"first_name": "Amelia Burrows",
"last_name": "",
"user_type": "Admin",
"user_id": "10108000000009004"
},
"created_time": "May 28, 2024 04:44 PM",
"modified_by": {
"zuid": "77941453",
"is_confirmed": false,
"email_id": "emmy@zylker.com",
"first_name": "Amelia Burrows",
"last_name": "",
"user_type": "Admin",
"user_id": "10108000000009004"
},
"modified_time": "May 28, 2024 04:44 PM",
"capacity": {
"memory": "2048"
},
"project_details": {
"project_name": "ZylkerShipments",
"id": "10108000003823392",
"project_type": "Live"
},
"id": "10108000003823563"
},
"headers": {},
"params": {
"param1": "value1"
}
},
"cron_status": true,
"modified_time": "Jun 07, 2024 01:03 PM",
"modified_by": {
"zuid": "77941453",
"is_confirmed": false,
"email_id": "emmy@zylker.com",
"first_name": "Amelia Burrows",
"last_name": "",
"user_type": "Admin",
"user_id": "10108000000009004"
},
"project_details": {
"project_name": "ZylkerShipments",
"id": "10108000003823392",
"project_type": "Live"
},
"end_time": "1719212399",
"cron_detail": {
"jobId": "10108000004280661",
"transactionTimeout": -1,
"hour": 0,
"minute": 0,
"second": 0,
"repetition_type": "yearly",
"months": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11
],
"weeks_of_month": [
1,
3,
4,
5
],
"week_day": [
1
],
"timezone": "PST"
},
"id": "10108000004280661"
}
}
Yes
No
Send your feedback to us