英文:
How to apply dynamic Condition in scheduler in spring?
问题
我有一个安卓应用程序,可以在数据库中保存的特定日期和时间提醒用户进行工作。
我想要创建一个功能,在用户的工作时间后的30分钟内更改用户的工作状态,为此我必须每天、每秒钟都在数据库中检查现在是否有任何工作?
我可以在Spring Boot中使用调度程序,但如何将数据库中存储的时间应用于运行此调度任务?
可能没有工作,那么就会产生不必要的调用。
如何应用条件,使调度程序只在工作准备就绪时才会被调用?
英文:
I have an android app which reminds user to their specific Work at any Date and time that saved on database.
I want to create functionality that changes user work status after 30 min of their work time and for this I have to check in the Database every day and every second that Is there any work now?
I can use scheduler in spring boot, but how can I apply database stored time to run this schedule task?
There may possibly of no work then, there will be unnnecessary calls.
How can I apply condition that Scheduler must be call only when Work is ready?
专注分享java语言的经验与见解,让所有开发者获益!
评论