Skip to content

Instantly share code, notes, and snippets.

@PonDad
Created April 3, 2016 06:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PonDad/27ec6e2a8148084ec70f358e858415b1 to your computer and use it in GitHub Desktop.
Save PonDad/27ec6e2a8148084ec70f358e858415b1 to your computer and use it in GitHub Desktop.
hubot-scripts
# Description:
# Wifi定期接続
#
# Commands:
#
cronJob = require('cron').CronJob
child_process = require('child_process')
module.exports = (robot) ->
new cronJob
cronTime: "*/10 * * * *"
onTick: ->
child_process.exec 'sh /home/pi/wifi_reconnect.sh', (error, stdout, stderr) ->
msg.send(stdout)
msg.send(stderr)
msg.send(error)
return
start: true
timeZone: "Asia/Tokyo"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment