       _other -> -Timex.Duration.diff(started_at, nil, :seconds)
     end
     timeout = max(1, min((timeout - running_for_seconds) * 2, @max_timeout)) # 2h
+    if state.timer do
+      Process.cancel_timer(state.timer)
+    end
     timer = Process.send_after(self(), {:restart}, timeout * 1000)
     state = %{
       state |

    {:noreply, state}
  end
  def handle_info({:restart}, state) do
    Serverboards.Plugin.Runner.stop(state.cmd)
    handle_cast({:start}, state)
  end

    else nil end

    timeout = max(1, waits)
    if state.timer do
      Process.cancel_timer(state.timer)
    end
    timer = Process.send_after(self(), {:restart}, timeout * 1000)
    state = %{
      state |
