From 7709f34c24b59613deda75356b2bac63c7cd674f Mon Sep 17 00:00:00 2001 From: David Gillies Date: Thu, 1 Mar 2018 10:17:57 -0800 Subject: [PATCH] Make HUBOT_STANDUP_WEEKDAYS work --- scripts/standup.coffee | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/standup.coffee b/scripts/standup.coffee index a5cf9b4..9788be0 100644 --- a/scripts/standup.coffee +++ b/scripts/standup.coffee @@ -211,8 +211,9 @@ module.exports = (robot) -> PREPEND_MESSAGE += ' ' # Check for standups that need to be fired, once a minute - # Monday to Friday. - new cronJob('1 * * * * 1-5', checkStandups, null, true) + # Defaults to Monday to Friday. + WEEKDAYS_CRON = process.env.HUBOT_STANDUP_WEEKDAYS or '1-5' + new cronJob('1 * * * * '+ WEEKDAYS_CRON, checkStandups, null, true) # Global regex should match all possible options robot.respond /(.*?)standups? ?(?:([A-z]*)\s?\@\s?)?((?:[01]?[0-9]|2[0-4]):[0-5]?[0-9])?(?: UTC([- +]\d\d?))?(.*)/i, (msg) ->