Skip to content

Instantly share code, notes, and snippets.

@tomrandle
Created October 17, 2016 13:59
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 tomrandle/0c3128e93d2b78c18adc0a0d3f38b27f to your computer and use it in GitHub Desktop.
Save tomrandle/0c3128e93d2b78c18adc0a0d3f38b27f to your computer and use it in GitHub Desktop.
closeLunch
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