bullmq - v6.0.3
    Preparing search index...

    Interface JobSchedulerJobOptions

    Internal job options for jobs produced by a JobScheduler. In addition to the public JobsOptions, scheduler-produced jobs carry the repeat settings the scheduler needs in order to schedule the next iteration. The legacy-only key and jobId repeat fields are intentionally excluded.

    This type is internal: repeat is no longer a valid option for Queue.add; use Queue.upsertJobScheduler to schedule repeating jobs.

    interface JobSchedulerJobOptions {
        attempts?: number;
        backoff?: number | BackoffOptions;
        continueParentOnFailure?: boolean;
        deduplication?: DeduplicationOptions;
        delay?: number;
        failParentOnFailure?: boolean;
        ignoreDependencyOnFailure?: boolean;
        jobId?: string;
        keepLogs?: number;
        lifo?: boolean;
        parent?: ParentOptions;
        prevMillis?: number;
        priority?: number;
        removeDependencyOnFailure?: boolean;
        removeOnComplete?: number | boolean | KeepJobs;
        removeOnFail?: number | boolean | KeepJobs;
        repeat?: Omit<RepeatOptions, "key" | "jobId">;
        repeatJobKey?: string;
        sizeLimit?: number;
        stackTraceLimit?: number;
        telemetry?: { metadata?: string; omitContext?: boolean };
        timestamp?: number;
    }

    Hierarchy (View Summary)

    Index
    attempts?: number

    The total number of attempts to try the job until it completes.

    1
    
    backoff?: number | BackoffOptions

    Backoff setting for automatic retries if the job fails

    continueParentOnFailure?: boolean

    If true, starts processing parent job as soon as any of its children fail.

    deduplication?: DeduplicationOptions

    Deduplication options.

    delay?: number

    An amount of milliseconds to wait until this job can be processed. Note that for accurate delays, worker and producers should have their clocks synchronized.

    0
    
    failParentOnFailure?: boolean

    If true, moves parent to failed if any of its children fail.

    ignoreDependencyOnFailure?: boolean

    If true, moves the jobId from its parent dependencies to failed dependencies when it fails after all attempts.

    jobId?: string

    Override the job ID - by default, the job ID is a unique integer, but you can use this setting to override it. If you use this option, it is up to you to ensure the jobId is unique. If you attempt to add a job with an id that already exists, it will not be added.

    keepLogs?: number

    Maximum amount of log entries that will be preserved

    lifo?: boolean

    If true, adds the job to the right of the queue instead of the left (default false)

    parent?: ParentOptions

    Parent options

    prevMillis?: number

    Internal property used by repeatable jobs.

    priority?: number

    Ranges from 0 to 2 097 151. 0 means no explicit priority, and jobs with no explicit priority are processed before prioritized jobs. For prioritized jobs, lower numbers are processed before higher numbers. Note that using priorities has a slight impact on performance, so do not use it if not required.

    0
    
    removeDependencyOnFailure?: boolean

    If true, removes the job from its parent dependencies when it fails after all attempts.

    removeOnComplete?: number | boolean | KeepJobs

    If true, removes the job when it successfully completes When given a number, it specifies the maximum amount of jobs to keep, or you can provide an object specifying max age and/or count to keep. It overrides whatever setting is used in the worker. Default behavior is to keep the job in the completed set.

    When using age or count, the eviction is evaluated on a best-effort basis every time a job finishes; BullMQ does not run a background timer, so aged jobs are only removed once another job completes after their expiration.

    removeOnFail?: number | boolean | KeepJobs

    If true, removes the job when it fails after all attempts. When given a number, it specifies the maximum amount of jobs to keep, or you can provide an object specifying max age and/or count to keep. It overrides whatever setting is used in the worker. Default behavior is to keep the job in the failed set.

    When using age or count, the eviction is evaluated on a best-effort basis every time a job fails; BullMQ does not run a background timer, so aged jobs are only removed once another job fails after their expiration.

    repeat?: Omit<RepeatOptions, "key" | "jobId">
    repeatJobKey?: string

    Internal property used by repeatable jobs to save base repeat job key.

    sizeLimit?: number

    Limits the size in bytes of the job's data payload (as a JSON serialized string).

    stackTraceLimit?: number

    Limits the amount of stack trace lines that will be recorded in the stacktrace.

    telemetry?: { metadata?: string; omitContext?: boolean }

    Telemetry options

    Type Declaration

    • Optionalmetadata?: string

      Metadata, used for context propagation.

    • OptionalomitContext?: boolean

      If true telemetry will omit the context propagation

      false
      
    timestamp?: number

    Timestamp when the job was created.

    Date.now()