updateSchedule method

  1. @override
Future<Schedule> updateSchedule(
  1. UpdateScheduleRequest request
)
override

Updates an active or paused Schedule.

When the Schedule is updated, new runs will be scheduled starting from the updated next execution time after the update time based on the time_specification in the updated Schedule. All unstarted runs before the update time will be skipped while already created runs will NOT be paused or canceled.

Throws a http.ClientException if there were problems communicating with the API service. Throws a ServiceException if the API method failed for any reason.

Implementation

@override
Future<Schedule> updateSchedule(UpdateScheduleRequest request) async {
  if (isClosed) throw StateError('Service is closed');

  if (_updateSchedule case final updateSchedule?) {
    return updateSchedule(request);
  }
  throw UnsupportedError('updateSchedule');
}