cron 0.2.2

  • Readme
  • Changelog
  • Installing
  • 92

A cron-like time-based job scheduler for Dart #

Run tasks periodically at fixed times or intervals.

Usage #

A simple usage example:

import 'package:cron/cron.dart';

main() {
  var cron = new Cron();
  cron.schedule(new Schedule.parse('*/3 * * * *'), () async {
    print('every three minutes');
  cron.schedule(new Schedule.parse('8-11 * * * *'), () async {
    print('between every 8 and 11 minutes');

Changelog #

0.2.2 #

  • Schedule returns ScheduledTask which allows cancelling a scheduled task.

0.2.1 #

  • Fixed a type-cast bug.

0.2.0 #

  • Dart 2 support.

0.1.0 #

  • Fix issues for Dart 2 compatibility.

0.0.2 #

  • Slightly better handling of the async errors.

0.0.1 #

  • Initial version.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  cron: ^0.2.2

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:cron/cron.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Nov 4, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.0
  • pana: 0.12.21


Detected platforms: Flutter, web, other

No platform restriction found in primary library package:cron/cron.dart.

Health suggestions

Fix lib/cron.dart. (-0.50 points)

Analysis of lib/cron.dart reported 1 hint:

line 98 col 9: Don't explicitly initialize variables to null.

Maintenance suggestions

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and cron.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0