Pulse
GithubCloud(Pulsecron)
  • What is Pulse?
  • Why Pulse?
  • Quick Start
  • DOCS
    • Setup & Config
      • Connection
      • Config
        • Name
        • ProcessEvery
        • DefaultConcurrency
        • MaxConcurrency
        • LockLimit
        • DefaultLockLimit
        • DefaultLockLifetime
        • Sort
        • ResumeOnRestart
    • Defining Job Processors
    • Managing Job Processor
      • Start
      • Stop
    • Creating Jobs
      • Every
      • Schedule
      • Now
      • Create
    • Managing Jobs
      • Jobs
      • Cancel
      • Disable
      • Enable
      • Purge
      • isRunning
      • isExpired
      • Manually working
        • Save
        • Unique
        • RepeatEvery
        • RepeatAt
        • Schedule
        • Remove
        • Priority
        • Touch
        • SetShouldSaveResult
        • Fail
        • Run
        • Disable
        • Enable
Powered by GitBook
On this page
  • job.priority(priority)
  • Example Usage
  • Parameters
  • Returns

Was this helpful?

Edit on GitHub
  1. DOCS
  2. Managing Jobs
  3. Manually working

Priority

PreviousRemoveNextTouch

Last updated 1 year ago

Was this helpful?

job.priority(priority)

The priority method assigns a priority level to a job, determining its processing order relative to other jobs in the queue. This method is crucial for managing execution precedence, especially in systems where certain tasks need urgent handling.

This does NOT save the job in the database. you must explicitly declare if you want to save it

Example Usage

const job = pulse.create('test', {});
job.priority('highest');
job.save(); // If you want to save it

Parameters

  • priority (string | number): A priority label ('lowest', 'low', 'normal', 'high', 'highest') or a numeric value that corresponds to a predefined priority level.

Returns

  • Job: Returns the job instance, enabling method chaining.

save()