v0.6.2
cron
基于时间的任务调度器,类似于 cron。在固定时间或间隔周期性地运行任务。
600喜欢 7.7万近 30 天下载160Pub 分数
AndroidiOSWebmacOSWindowsLinux
用于 Dart 的类似 cron 的基于时间的任务调度器
以下为英文项目原文快照,最新内容请访问 GitHub。
Run tasks periodically at fixed times or intervals.
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');
});
}
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
}
依赖清单 4 项
^1.1.1^5.0.0^1.25.0^1.3.1先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗