+1, I have effectively the same situation - I need "singleton scheduled 
tasks" more so that "singleton actors" (the billing code should only run 
once per day). 

What are the best practices for this scenario?

I guess I could schedule the task in the start callback of the Singleton, 
and stop it in the stop callback. Then when the cluster leader changes the 
schedule would be first stopped, then restarted when the Singleton starts 
up again on the new leader. Maybe that's a workable solution?

If the leader is terminated, do the ActorSystem.scheduler.schedule() tasks 
that were initiated on it disappear? They aren't replicated across the 
cluster or something crazy like that, right? (Since they're called on the 
ActorSystem it looks ambiguous)


-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to