Created
October 17, 2016 13:59
-
-
Save tomrandle/0c3128e93d2b78c18adc0a0d3f38b27f to your computer and use it in GitHub Desktop.
closeLunch
This file contains hidden or 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
function closeLunch() { | |
var triggers = ScriptApp.getProjectTriggers(); | |
updateUnattendingRows(); | |
triggerSlackRequest("main", "Lunch orders are now closed"); | |
triggerSlackRequest(completedOrdersUser, "Lunch is now officially closed"); | |
for (var i = 0; i < triggers.length; i++) { | |
if (triggers[i].getHandlerFunction() == "lunchReminder" || triggers[i].getHandlerFunction() == "notifyOrdersAppearCompleted") { | |
ScriptApp.deleteTrigger(triggers[i]); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment