0

I have a scheduler module that defines 4 jobs, each of which run at different intervals, please look at the following code:

agenda.define('posting', Autopost.post);
agenda.define('posting 1', Autopost.post.bind(1, null));
agenda.define('posting 2', Autopost.post.bind(2, null));
agenda.define('posting 3', Autopost.post.bind(3, null));

agenda.every('posting', '1 minute')
agenda.every('posting', '2 minutes')
agenda.every('posting', '3 minutes')
agenda.every('posting', '4 minutes')

What's happening is that the first one runs and finished but the last 3 never finish and have set a lockedAt key in them, which doesn't let them run after that.

Is this happening because i am calling the same function with different parameters at different intervals ?

I have debugged all of the code and am unable to still figure out why this is happening.

0 Answers0