Hi, I am just new to akka and in programming, but someone told me that ActorSystem.scheduler is not accurate because it depends on the thread workload.
And if so, then a scheduled task for 5 minutes maybe delayed up to X minutes depending on the load of the application? Is that true? For me the only inaccuracy I could think of is the akka.scheduler.tick-duration implementation which I think would just be about 1 second maximum inaccuracy (if you use the default property). On Saturday, November 8, 2014 7:25:04 AM UTC+8, jxtps wrote: > > +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.
