-
Notifications
You must be signed in to change notification settings - Fork 23
Description
cron is a beautifully simple and powerful package. Thank you to the developers for their contributions.
This commit introduces features to enhance job management within cron, built upon the existing functionality:
-
Job Class: Each job is now represented as a data class, utilizing the
callfunction for task execution. This self-bootstrapping design enables in-class logic and job state management (run, pause, stop, delete). -
Schedule Name: Added a
nameproperty to theScheduleclass, allowing for easier identification and management of individual schedules. -
Cron Management Methods: Introduced
indexWhere,updateAt,removeAt, andcountmethods to theCronclass.indexWherefacilitates locating specificScheduleinstances for updates or removal, enabling adjustments to trigger times and runtime states viaupdateAt.
The implementation has been thoroughly tested and can be found in example/jobs.dart.
I am already using this functionality in my free software project, Gai (Generative-Ai tools for beginner), which is available on Microsoft Store, winget-pkgs, Flathub, and Snapcraft.
Project URL: https://webpath.iche2.com/app/gai/download_en.html