       _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

      started_at: nil,
      task: nil
    }
    Logger.info("#{inspect self()} Restart init #{state.init.id} in #{state.timeout} seconds.", state: state)
    state
  end

