FLUTTER ECOSYSTEM

agilord/cron

Dart용 크론 유사 시간 기반 작업 스케줄러

cron 프로젝트 이미지
Stars
122
Forks
23
최근 푸시(UTC)
2025. 4. 30.
프로젝트 상태
활성
Agilord, LLC GitHub avatar
GITHUB Organization

Agilord, LLC ↗

언어Dart

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 4 개

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

Cron

Run tasks periodically at fixed times or intervals.

pub package

Usage

A simple usage example:

import 'package:cron/cron.dart';

void main() {
  final cron = Cron();

  cron.schedule(Schedule.parse('*/3 * * * *'), () async {
    print('every three minutes');
  });

  cron.schedule(Schedule.parse('8-11 * * * *'), () async {
    print('between every 8 and 11 minutes');
  });
}

Cron parser

You can easily create and parse cron format:

import 'package:cron/cron.dart';

void main() {
  print(Schedule.parse('3-5 * * * *').minutes); // [3, 4, 5]
  
  print(Schedule(hours: 12, minutes: 25, weekdays: [2, 3])
      .toCronString()); // 25 12 * * 2,3
}

Links