Skip to content

Scheduled HangFire Jobs duplicate on server restart #121

@Suchiman

Description

@Suchiman

If you use an activity like StartAt, then Elsa will schedule the ResumeWorkflowJob.ExecuteAsync job in Hangfire to run at the specified start at timestamp.
Hangfire stores those persistently in the Hangfire.Jobs table, so they survive a server reboot.
Everytime the Elsa server application rebootst though, Elsa will schedule another ResumeWorkflowJob.ExecuteAsync for all workflow instances currently suspended on such an activity, regardless if a job is already scheduled.
This very rapidly creates thousands of duplicate scheduled jobs in the hangfire dashboard.

Seen in Elsa 3.6-rc2

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