Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Fail a job #191

jbrooksuk opened this Issue · 1 comment

3 participants


I'm building an application which runs Kue after a file has changed, it triggers a set of jobs and all is good. However I want to be able to purposefully fail a job if something goes wrong.

For example, I request a web page, but if the http.statusCode !== 200 the job should fail and no other job should be processed.

How do I go about that?


You can fail a job via

var kue = require('kue')
   , jobs = kue.createQueue();

jobs.process('email', function(job, done) {
    var err = new Error('purposely fail job');

@drudge please close

@drudge drudge closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.