lykmapipo/kue-scheduler

Check existing job using job Id

Closed this issue · 2 comments

Hi,
How can I check if a job with an existing job Id exists before calling Queue.createJob() ?

@leizard try using Kue's get function:

kue.Job.get( id, function( err, job ) {
    // err - job doesn't exist
   // job - found a job with that id
});

@leizard
kue-scheduler its just a utility on top of kue and we tried as much as we can not to over-rule kue logics. So anything applies in kue is same as in kue-scheduler and infact kue-scheduler export the same kue queue instance.

So @adampatarino point it correctly.

Hope it helps.