Last active
December 22, 2015 00:01
-
-
Save saihoooooooo/6386504 to your computer and use it in GitHub Desktop.
node-cron in hubot.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description: | |
# No overtime by node-cron. | |
cron = require('cron').CronJob | |
random = require('hubot').Response::random | |
module.exports = (robot) -> | |
new cron '0 0 18 * * 1-5', () -> | |
say = '定時退社の時間になりました。' + random [ | |
'毎日遅くまでご苦労様です。今日ぐらいは早く帰ってもいいんじゃないですか。' | |
'早く帰ってゆっくりお風呂に入れば疲れもとれますよ。' | |
'今日のドラマを楽しみにしてたんじゃないですか?' | |
'家であなたの帰りを待ってる人が居ますよ。' | |
'役職のある人から早く帰りましょう。' | |
'残業のし過ぎは生産効率の低下を招きます。' | |
'貴様ら、とっととお帰りください。' | |
'退社、退社、さっさと退社、しばくぞ!!!!' | |
'今日は用事があるのでお先に失礼します。' | |
'HUB行かないか。' | |
'ここは俺に任せてお前らは早く逃げろ!' | |
'本日の白州、これまで。' | |
'process.exit();' | |
'完全な残業ですので、残業発生ですので退社をお願いいたします。' | |
'ああっ、もうダメッ!ぁあ…会社出るっ、会社出ますうっ!!' | |
'まだあわてるような時間じゃない。' | |
'え?もう帰るんですか?' | |
'疾風(はや)く孵(かえ)れ。' | |
] | |
user = {room: '#hogehoge/0123456789abcdef'} | |
robot.send user, say | |
, null, true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment