Agenda - v6.2.3
    Preparing search index...

    Interface JobStateNotification

    Notification payload sent when a job's state changes during execution. This enables bi-directional communication so that all subscribers can receive job lifecycle events (start, success, fail, complete, etc.)

    interface JobStateNotification {
        duration?: number;
        error?: string;
        failCount?: number;
        jobId: JobId;
        jobName: string;
        lastFinishedAt?: Date;
        lastRunAt?: Date;
        progress?: number;
        retryAt?: Date;
        retryAttempt?: number;
        source?: string;
        timestamp: Date;
        type: JobStateType;
    }
    Index

    Properties

    duration?: number

    Job execution duration in ms for 'complete' events

    error?: string

    Error message for 'fail' events

    failCount?: number

    Failure count for 'fail' events

    jobId: JobId
    jobName: string
    lastFinishedAt?: Date

    When the job finished for 'complete' events

    lastRunAt?: Date

    When the job started for 'complete' events

    progress?: number

    Progress percentage (0-100) for 'progress' events

    retryAt?: Date

    Scheduled retry time for 'retry' events

    retryAttempt?: number

    Retry attempt number for 'retry' events

    source?: string
    timestamp: Date