cron 0.6.0 copy "cron: ^0.6.0" to clipboard
cron: ^0.6.0 copied to clipboard

A time-based job scheduler similar to cron. Run tasks periodically at fixed times or intervals.

example/example.dart

import 'package:cron/cron.dart';

Future<void> main() async {
  final cron = Cron();

  try {
    cron.schedule(Schedule.parse('*/6 * * * * *'), () {
      print(DateTime.now());
    });

    await Future.delayed(Duration(seconds: 20));
    await cron.close();
  } on ScheduleParseException {
    // "ScheduleParseException" is thrown if cron parsing is failed.
    await cron.close();
  }
}
465
likes
140
pub points
97%
popularity

Publisher

verified publisheragilord.com

A time-based job scheduler similar to cron. Run tasks periodically at fixed times or intervals.

Repository (GitHub)
View/report issues

Topics

#cron #scheduler #cron-parser #schedule #cron-time

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

clock

More

Packages that depend on cron