/// <summary> /// Create a job schedule. (see /// http://aka.ms/azureautomationsdk/jobscheduleoperations for more /// information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Automation.IJobScheduleOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group /// </param> /// <param name='automationAccount'> /// Required. The automation account name. /// </param> /// <param name='parameters'> /// Required. The parameters supplied to the create job schedule /// operation. /// </param> /// <returns> /// The response model for the create job schedule operation. /// </returns> public static JobScheduleCreateResponse Create(this IJobScheduleOperations operations, string resourceGroupName, string automationAccount, JobScheduleCreateParameters parameters) { return Task.Factory.StartNew((object s) => { return ((IJobScheduleOperations)s).CreateAsync(resourceGroupName, automationAccount, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }
/// <summary> /// Create a job schedule. (see /// http://aka.ms/azureautomationsdk/jobscheduleoperations for more /// information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Automation.IJobScheduleOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group /// </param> /// <param name='automationAccount'> /// Required. The automation account name. /// </param> /// <param name='parameters'> /// Required. The parameters supplied to the create job schedule /// operation. /// </param> /// <returns> /// The response model for the create job schedule operation. /// </returns> public static Task<JobScheduleCreateResponse> CreateAsync(this IJobScheduleOperations operations, string resourceGroupName, string automationAccount, JobScheduleCreateParameters parameters) { return operations.CreateAsync(resourceGroupName, automationAccount, parameters, CancellationToken.None); }