I am using the Azure Scheduler REST API, and I am having a hard time updating one job recurrence from weekly/monthly to hourly. Specifically I get the following error: Schedules are not supported for recurrence unit 'Hour'.
The problem is that the specific job used to have some advanced scheduling options, which of course I do not need if I want to update to hourly frequency. According to the MSDN Documentation if you do not include one field (in this case 'schedule'), the current value will be carried over. I have tried not including the schedule field at all, including it with null value, including it with empty object or with all properties (hours, minutes etc.) set to null and in all cases I got a HTTP Bad Request with the error message above.
Here's my job as returned by a get operation:
{
"id":"************",
"type":"Microsoft.Scheduler/jobCollections/jobs",
"name":"my-job-collection/my-job-id",
"properties":{
"startTime":"2016-03-01T00:00:00Z",
"action":{ /*....*/ },
"recurrence":{
"frequency":"week",
"interval":4,
"schedule":{
"minutes":[ 0 ],
"hours":[ 12 ],
"weekDays":[ "saturday" ]
}
},
"state":"enabled",
"status":{ /*....*/ }
}
And here is the patch I am trying to submit:
{
"properties":{
"recurrence":{
"frequency":"hour"
}
}
}
/* or */
{
"properties":{
"recurrence":{
"frequency":"hour",
"schedule": null
}
}
}
The API version I am using is 2016-01-01.
Any help would be appreciated. Thank you
"recurrence": {"frequency": "minute","interval": 60}
– Jack Zeng