ScheduledJob constructor
ScheduledJob({
- required String name,
- required ScheduleParser<
Schedule> schedule, - required List<
BaseStep> steps, - Map<
String, dynamic> jobParameters = const {}, - FutureOr<
bool> precondition(- ExecutionContext context
- dynamic onStarted(
- ExecutionContext context
- dynamic onSucceeded(
- ExecutionContext context
- dynamic onError(
- ExecutionContext context,
- dynamic error,
- StackTrace stackTrace
- dynamic onCompleted(
- ExecutionContext context
- List<
Job> branchesOnSucceeded = const [], - List<
Job> branchesOnFailed = const [], - List<
Job> branchesOnCompleted = const [],
Returns the new instance of ScheduledWorkflow
.
Implementation
ScheduledJob({
required String name,
required this.schedule,
required List<BaseStep> steps,
Map<String, dynamic> jobParameters = const {},
FutureOr<bool> Function(ExecutionContext context)? precondition,
Function(ExecutionContext context)? onStarted,
Function(ExecutionContext context)? onSucceeded,
Function(ExecutionContext context, dynamic error, StackTrace stackTrace)?
onError,
Function(ExecutionContext context)? onCompleted,
List<Job> branchesOnSucceeded = const [],
List<Job> branchesOnFailed = const [],
List<Job> branchesOnCompleted = const [],
}) : super(
name: name,
steps: steps,
jobParameters: jobParameters,
precondition: precondition,
onStarted: onStarted,
onError: onError,
onSucceeded: onSucceeded,
onCompleted: onCompleted,
branchesOnSucceeded: branchesOnSucceeded,
branchesOnFailed: branchesOnFailed,
branchesOnCompleted: branchesOnCompleted,
);