title: Change the scheduled time on an akka task
body: <p>Hi I have an akka actor:</p>
  
  <pre><code>public class StatusActor  extends UntypedActor {
  public static ActorRef instance = Akka.system().actorOf(
          new Props(StatusActor.class));
  
  public void onReceive(Object message) {
      Logger.info("Message received");
  }
  </code></pre>
  
  <p>}</p>
  
  <p>And I create a schedule for it ever 5 minutes:</p>
  
  <pre><code>Akka.system().scheduler().schedule(
          Duration.create(60, TimeUnit.SECONDS),
          Duration.create(5, TimeUnit.MINUTES), StatusActor.instance, null);
  </code></pre>
  
  <p>The problem I have is I want to change this time dynamically? Is there any way I can do this? I cannot find any methods to stop it. So then I can just start it again.</p>
  
  <p>The only hack way I have thought of is at the end of the onReceive have it call the akka schedule to start again, and change all the values to run once, and have a static variable in the StatusActor for the frequency.</p>
  
  <p>If anyone could tell me how to stop an actor/get access to it would be very helpful.</p>