Job which obey delay and cron both
Created by: sudhirbitsgoa
Hi,
var Queue = require('bull');
var cronDelay = new Queue('cronDelay');
cronDelay.add({
everysec: 'every3sec'
}, {
delay: 10000,
repeat: {
cron: '*/3 * * * * *'
}
}).catch(err => console.log(err))
cronDelay.process(5, (job, done) => {
console.log('%j', job.data);
done()
});
var i = 0;
setInterval(() => {
console.log(i++);
}, 1000)
I created a job with delay of 10sec and repeat after 10sec for every 3 sec. This is not supported.