Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Schedule time-specified tasks in distributed system

I use ScheduledThreadPoolExecutor for tasks which have different execution times. For example, one task scheduled for 9:30 PM tonight and the other for 8:00 AM tomorrow. But if the server is shut down for some reason, the tasks disappear.

I am thinking about task persistence in a database so that I can re-trigger the failed tasks at a later time—but I guess that's not a perfect solution.

Are there any good frameworks or any other suggestions for this?

like image 667
Roger.H Avatar asked Sep 13 '26 07:09

Roger.H


1 Answers

You can use Redis based task scheduling framework like Redisson. It also supports quartz cron experssions. Here is documentation about it

like image 156
Nikita Koksharov Avatar answered Sep 15 '26 20:09

Nikita Koksharov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!