CronJob constructor

CronJob({
  1. required CronTimePeriod timePeriod,
  2. required Future<Message?> onCall(
    1. Request request,
    2. CronTimePeriod period
    ),
  3. bool resetPeriodOnExternalCall = true,
  4. bool allowExternal = false,
  5. String? name,
  6. GlobalKey<State<StatefulComponent>>? key,
})

Implementation

CronJob(
    {required this.timePeriod,
    required this.onCall,
    this.resetPeriodOnExternalCall = true,
    this.allowExternal = false,
    String? name,
    GlobalKey? key})
    : name = name ?? "cron_job_${timePeriod.runtimeType}${getRandomId(5)}";