Skip to content

There is no way to wait for completion of started Jobs after calling Stop() #98

@mrwonko

Description

@mrwonko

When calling Stop() there may still be be Jobs whose Goroutines have been created but were never scheduled. It is therefore impossible to wait for all Jobs to complete, because some may not yet be running, making it impossible to track them.

The right place for adding to a sync.WaitGroup would be in Cron:run() right before go c.runWithRecovery(e.Job). You could then add a new Cron:Wait() function for waiting for jobs to finish after calling Stop().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions