- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Description
Updates or creates a new schedule for the specified agent.
URL parameters
URL parameter ordering
The URL parameters below are listed in the order they should be entered in the API URL.
Name | Required | Type | Description |
---|---|---|---|
AgentID | True | numeric | Unique identifier of the agent. |
Frequency | True | string | None, Once, Interval, Daily, EveryWeekday, Weekly, or Monthly |
Once
Frequency
= Once
Name | Required | Type | Description |
---|---|---|---|
Starts | True | datetime | yyyy-MM-dd hh:mm:ss |
Interval
Frequency
= Interval
Name | Required | Type | Description |
---|---|---|---|
Starts | True | datetime | yyyy-MM-dd hh:mm:ss |
RepeatInterval | True | numeric | The interval to repeat the schedule at expressed as number of minutes. Must be one of the following: 15, 20, 30, 60, 120, 180, 240, 360, 720, 1440. |
Ends | False | date | Leave blank for never. yyyy-MM-dd |
Daily
Frequency
= Daily
Name | Required | Type | Description |
---|---|---|---|
Starts | True | datetime | yyyy-MM-dd hh:mm:ss |
RepeatEvery | True | numeric | Repeat every _ day. How often do you want to repeat? |
RepeatInterval | False | numeric | Leave blank for none. The interval to repeat the schedule at expressed as number of minutes. Must be one of the following: 15, 20, 30, 60, 120, 180, 240, 360, 720, 1440. |
RepeatIntervalHour | False | numeric | Number of hours the RepeatInterval will continue for. Number between 1 and 24 and has to be a multiple of RepeatInterval . |
Ends | False | date | Leave blank for never. yyyy-MM-dd |
EveryWeekday
Frequency
= EveryWeekday
Name | Required | Type | Description |
---|---|---|---|
Starts | True | datetime | yyyy-MM-dd hh:mm:ss |
RepeatEvery | True | numeric | Repeat every _ week. How often do you want to repeat? |
RepeatInterval | False | numeric | Leave blank for none. The interval to repeat the schedule at expressed as number of minutes. Must be one of the following: 15, 20, 30, 60, 120, 180, 240, 360, 720, 1440. |
RepeatIntervalHour | False | numeric | Number of hours the RepeatInterval will continue for. Number between 1 and 24 and has to be a multiple of RepeatInterval . |
Ends | False | date | Leave blank for never. yyyy-MM-dd |
Weekly
Frequency
= Weekly
Name | Required | Type | Description |
---|---|---|---|
Starts | True | datetime | yyyy-MM-dd hh:mm:ss |
RepeatEvery | True | numeric | Repeat every _ day. How often do you want to repeat? |
RunOn | True | string | Comma delimited list of which weekdays for the schedule to run on. (Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, and Saturday) |
RepeatInterval | False | numeric | Leave blank for none. The interval to repeat the schedule at expressed as number of minutes. Must be one of the following: 15, 20, 30, 60, 120, 180, 240, 360, 720, 1440. |
RepeatIntervalHour | False | numeric | Number of hours the RepeatInterval will continue for. Number between 1 and 24 and has to be a multiple of RepeatInterval . |
Ends | False | date | Leave blank for never. yyyy-MM-dd |
Monthly
Frequency
= Monthly
Name | Required | Type | Description |
---|---|---|---|
Starts | True | datetime | yyyy-MM-dd hh:mm:ss |
RepeatEvery | True | numeric | Repeat every _ day. How often do you want to repeat? |
RepeatBy | True | string | Specify either DayOfWeek or DayOfMonth |
RepeatInterval | False | numeric | Leave blank for none. The interval to repeat the schedule at expressed as number of minutes. Must be one of the following: 15, 20, 30, 60, 120, 180, 240, 360, 720, 1440. |
RepeatIntervalHour | False | numeric | Number of hours the RepeatInterval will continue for. Number between 1 and 24 and has to be a multiple of RepeatInterval . |
Ends | False | date | Leave blank for never. yyyy-MM-dd |
Returns
Name | Type | Description |
---|---|---|
Result | string | Success if the operation was successful. |
Sample request
curl -X GET 'https://api.mozenda.com/rest?WebServiceKey=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&Service=Mozenda10&Operation=Agent.SetSchedule&AgentID=1099&Frequency=Weekly&Starts=2020-07-28 12:00:00&RepeatEvery=2&RunOn=Sat,Sun'
Sample responses
XML
<?xml version="1.0" encoding="utf-8" ?>
<SetPublisherResponse
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Result>Success</Result>
</SetPublisherResponse>
JSON (add &ResponseFormat=JSON
)
{
"JsonResult": {
"Command": "Agent.SetSchedule",
"AutoLoggedIn": false,
"WebConsoleKey": "",
"Result": "Success",
"ErrorCode": "",
"ErrorDescription": "",
"ErrorList": [],
"ExecutionTime": {
"Ticks": 0,
"Days": 0,
"Hours": 0,
"Milliseconds": 0,
"Minutes": 0,
"Seconds": 0,
"TotalDays": 0,
"TotalHours": 0,
"TotalMilliseconds": 0,
"TotalMinutes": 0,
"TotalSeconds": 0
}
}
}
Was this article helpful?