Skip to content

Feature: Enhanced Job Management Capabilities #57

@huanguan1978

Description

@huanguan1978

cron is a beautifully simple and powerful package. Thank you to the developers for their contributions.

#56

This commit introduces features to enhance job management within cron, built upon the existing functionality:

  1. Job Class: Each job is now represented as a data class, utilizing the call function for task execution. This self-bootstrapping design enables in-class logic and job state management (run, pause, stop, delete).

  2. Schedule Name: Added a name property to the Schedule class, allowing for easier identification and management of individual schedules.

  3. Cron Management Methods: Introduced indexWhere, updateAt, removeAt, and count methods to the Cron class. indexWhere facilitates locating specific Schedule instances for updates or removal, enabling adjustments to trigger times and runtime states via updateAt.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions