Created by: nirpeer
In this following example, the repeatable job will start run at 02.02.2020, 12:00, for every 2 minutes.
queue
.add(
'repeat',
{ foo: 'bar' },
{
repeat: {
cron: '*/2 * * * * *', // every 2 seconds
startDate: new Date('2020-02-02 12:00:00')
}
}
)
This solution handles https://github.com/OptimalBits/bull/issues/764 issue.