# Modify an existing scheduled action Update the schedule repeatedly details for restart and shutdown commands ## Endpoints `PUT /api/v1/mdm/actions/scheduled/{action_name}` ## Request URL `https://{serverurl}/api/v1/mdm/actions/scheduled/{action_name}` ## Scope `MDMOnDemand.MDMDeviceMgmt.UPDATE` ## Header `Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52` ## Request Parameters ### Request Headers - **Content-Type** `string` — **Mandatory** — `application/json` - **Accept** `string` — **Mandatory** — `application/json` ### Path Parameters - **action_name** `string` — **Mandatory** - Name of the scheduled action ### Request Body `application/json` - **group_action_id** `long` — **Mandatory** - ID for the action scheduled to be executed on a group (required) - **groups** `array` — **Mandatory** - Array of group IDs with devices that need to be restarted or shutdown (required) - **time_zone** `string` — Optional - Timezone for which the scheduled action is to be executed (required) - **schedule_params** `JSON object` — Optional - Parameters for the schedule (required) - **reason_message** `string` — Optional - Reason for scheduling the action, used for auditing purposes (required) - **execution_type** `integer` — Optional - Type of execution: 1 = Once, 2 = Repeat (required) - **expiry** `long` — Optional - Time in milliseconds at which the scheduled command expires (required) - **schedule_once_time** `long` — Optional - Current time in milliseconds when action is scheduled to be executed once (required) - **action_name** `string` — Optional - Name of the action: restart or shutdown ## Sample Request ```curl curl --request PUT \ --url https://appdomain/api/v1/mdm/actions/scheduled/{action_name} \ --header 'Accept: application/json' \ --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \ --header 'Content-Type: application/json' \ --data '{"group_action_id":9007199254741060,"groups":["9007199254741037","9007199254741038","9007199254741039"]}' ``` ## Sample Request Body Modify an existing schedule to weekly on Mon/Wed/Fri ```json { "schedule_params": { "days_of_week": "1,3,5", "schedule_type": "Weekly", "weekly_time": "1430" }, "reason_message": "Weekly maintenance window", "action_name": "restart", "group_action_id": 9007199254741060, "groups": [ "9007199254741037", "9007199254741038", "9007199254741039" ], "execution_type": 2, "expiry": 600000, "time_zone": "America/Los_Angeles", "schedule_once_time": 1627970696000 } ``` ## Possible Response Codes - **202** — HTTP code ## Sample Response: HTTP 202 ```text 202 Accepted ``` **Duration:** 1 minute | **Threshold:** 60 | **Lock period:** 5 minutes Duration - Time window for the threshold. Threshold - Number of API calls allowed within the specified duration. Lock Period - Wait time before consecutive API requests.