Scheduled task pattern broken?

Hello, I started using plugin for scheduled tasks and when I do * * * * * pattern which is for every minute, it's being multi-executed every second
Solution:
Our plugin doesn't control this, the underlying https://docs.bullmq.io/ does
What is BullMQ | BullMQ
General description of BullMQ and its features
Jump to solution
30 Replies
čamdžić
čamdžićOP3w ago
čamdžić
čamdžićOP3w ago
Really weird Now it's being executed every 2-3 seconds or every 5 then every 1 Also when I use interval with like 5000 it's being ran every second or some random time
secre
secre3w ago
maybe it's good to try to look what values are actually stored in redis problem can be in bullmq or something else idk
čamdžić
čamdžićOP3w ago
it doesnt matter if i put pattern every minute it should be every minute not every 2-3 seconds, then every 5 seconds, then every 1 second like randomly
secre
secre3w ago
I mean yeah but you need to debug it somehow to get understanding why it can work like this it can be the plugin that is broken, or bullmq, or both, or even your redis setup idk
čamdžić
čamdžićOP3w ago
redis is just redis 7 pterodactyl egg untouched idk how can that be a problem
secre
secre3w ago
try to set timeZone for the task I wonder if that will help lmao
čamdžić
čamdžićOP3w ago
for every minute? I don't think so it's not working for interval too
secre
secre3w ago
idk bro, just try
čamdžić
čamdžićOP3w ago
not just pattern just a sec oh this is interesting
secre
secre3w ago
now it's working? xd
čamdžić
čamdžićOP3w ago
when I changeddb in bull options it worked are the patterns saved? like if i start bot with 1 minute it can't be changed to 5 minutes lmao
secre
secre3w ago
yeah tasks are set in place and even those that aren't in your code will be executed xd
čamdžić
čamdžićOP3w ago
wdym
secre
secre3w ago
or thats not the case try to delete file with your task and launch bot it should execute it anyways
čamdžić
čamdžićOP3w ago
wtff why can i disable bull saving crons to redis lmao
secre
secre3w ago
no because they USE redis under the hood
čamdžić
čamdžićOP3w ago
that's dumb lol idk who needs that
secre
secre3w ago
I mean redis is the way to execute those persistently or how do you write that word
čamdžić
čamdžićOP3w ago
yeah but crons shouldn't use redis there's no need lmao only tasks like to unmute user
secre
secre3w ago
i mean they work as that with redis, so why not it's just "mixed"
čamdžić
čamdžićOP3w ago
oh no it's not cuz of redis
secre
secre3w ago
you can have cron tasks, or those that you can execute manually
čamdžić
čamdžićOP3w ago
i literally just reinstalled redis removed every file and put this pattern */5 * * * * * and it's working every second
secre
secre3w ago
🤔
čamdžić
čamdžićOP3w ago
čamdžić
čamdžićOP3w ago
actually this is more like every 500ms 5 of them are executed in a second LMAO even with removeOnComplete, same thing happens
Solution
Favna
Favna3w ago
Our plugin doesn't control this, the underlying https://docs.bullmq.io/ does
What is BullMQ | BullMQ
General description of BullMQ and its features
čamdžić
čamdžićOP3w ago
Can I prevent it from saving to redis or something
Favna
Favna3w ago
No description

Did you find this page helpful?