Closed GeekyGeeky closed 1 year ago
@GeekyGeeky you can remove repeatable jobs like this
import Bull from '@ioc:Rocketseat/Bull';
import RepeatJob from 'App/Jobs/RepeatJob';
const { key } = new RepeatJob();
const repeatOpts = {
cron: '*/5 * * * *', // every 5 minutes
};
Bull.getByKey(key).bull.removeRepeatable(key, repeatOpts);
Bull.add(
key,
{},
{
repeat: repeatOpts,
}
);
Thank you @evoactivity
I would use your suggestion 👍
There is no method to remove repeatable job in the alpha package. Please can it be added?