   pluginWillUnload: ->
     for key, id of CONFIG
       config.set(key)
+    scheduler._tasks = []
 
   handleResponse: (e) ->
     {method, path, body, postBody} = e.detail

    return unless config.get('plugin.secretary.enable', false)
    return unless config.get('plugin.secretary.hourly_voice_enable', false)
    return unless @state.hasHourlyVoice
    if arguments.length == 0
      nowHour = new Date().getHours()
    else
      nowHour = new Date(time).getHours()
    audio = config.get("plugin.secretary.hourly_voice", [])?[nowHour]
    return unless audio
    pad = "00"
    nowHourString = nowHour.toString()
    if nowHourString.length < pad.length
      nowHourString = (pad + nowHourString).slice(-pad.length)
    notify __("It's %s now", "#{nowHourString}00"),
      audio: audio

  render: ->
    <div id='secretary' className='secretary'>

      audioFN = convertFilename ship_id, id
      setConfig(key, "http://#{server}/kcs/sound/kc#{shipFilename}/#{audioFN}.mp3")

    {$ships} =  window
    @setState
      hasHourlyVoice: $ships[ship_id]?.api_voicef > 1

  handleShipChange: (e) ->
    ship_id = parseInt(e.target.value)
