如何每天在特定时间触发Akka Scheduler? [英] How to fire akka scheduler daily for a particular time?
本文介绍了如何每天在特定时间触发Akka Scheduler?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我创建了Akka的调度程序,每天在固定时间(例如每天6:00 Am)发送邮件。
那么如何称呼演员呢?我的意思是我应该使用什么逻辑?
谢谢。
I created a Akka's scheduler to send mails daily by a fixed time ( example 6:00 Am daily ). So how to call the actor ? I mean what the logic should i use ? Thank you.
推荐答案
只需计算now和接下来的6PM之间的差,将其作为初始延迟,然后每隔24小时重复一次?
Just calculate the difference between now and the following 6PM, put that as the initial delay and then repeat every 24h?
这篇关于如何每天在特定时间触发Akka Scheduler?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文