Click or drag to resize

IWsEndUserSetAddServerScheduledOperation Method

Create a new scheduled task. By the method SetAddServerScheduledOperation () of Aruba is WsEndUser can create a new scheduled task by specifying the type and date.

Namespace:  Aruba.Cloud.WsEndUser
Assembly:  Aruba.Cloud.WsEndUser (in Aruba.Cloud.WsEndUser.dll) Version: (
WsResult SetAddServerScheduledOperation(
	SetAddScheduledOperationRequest operationRequest


Type: Aruba.Cloud.Provisioning.EntitiesSetAddScheduledOperationRequest
An object of type ScheduledOperationRequest containing the data of the transaction scheduled to be created. Must be given ScheduleStartDate (execution date), Operation (type of operation), ServerID (if any ServerID) ScheduleOperationLabel (any label), ScheduleOperationsParameters (any parameters for the operation).

Return Value

Type: WsResult
The method returns an object WsResult containing information on the outcome of the method call.
Below is an example of a method call SetAddServerScheduledOperation() to Aruba WsEndUser:
private void AddScheduledOperation()
  ScheduledOperationRequest operationRequest = new ScheduledOperationRequest()
    Operation = ScheduledOperationTypes.StartVirtualMachine,
    ScheduleOperationLabel = "Accensione server Test",
    ScheduleStartDate = DateTime.Now.AddDays(1),
    ServerID = 46

  using (WsEndUserClient client = this.WsEndUserClient)
    WsResult result = client.SetAddServerScheduledOperation(operationRequest);

    if (result.Success)

    this.LogError("SetAddServerScheduledOperation", new Exception(result.ResultMessage));
    throw new CodedException(result.ResultCode, result.ResultMessage);
See Also