Created
October 14, 2016 20:54
-
-
Save MGallow/488f7df288701ad8bef7cf0a8f8b71ae to your computer and use it in GitHub Desktop.
Let Slack notify you when your script is finished running!
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
# This is a simple script that will allow Slack to notify you when your script is finished running. | |
# Specifically, you will receive a message that says: "Script Complete". | |
# But first, you need to generate a Slack token. | |
# See here: https://api.slack.com/tokens | |
from slacker import Slacker | |
Token = "PLACE TOKEN HERE" | |
slack = Slacker(Token) | |
# Send a message to #CHANNEL. | |
# Adjust CHANNEL and USERNAME to suit your needs. | |
# Be sure that this line is placed at the end of your script. | |
message = slack.chat.post_message('#CHANNEL',"@USERNAME Script Complete", as_user = False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment