Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

Commit

Permalink
refs #6 add slack_reminder.py
Browse files Browse the repository at this point in the history
  • Loading branch information
takanory committed Apr 18, 2017
1 parent 58e579a commit 5ebd929
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions jobs/slack_reminder.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import logging
from datetime import datetime

from utils import user, slack, holiday, google_sheets

logger = logging.getLogger(__name__)

# スプレッドシートのID
SHEET_ID = '1u-F1Ixh2s-FBMULHv8w4JrSkQnHsTCG5BjjMQFkWRMU'

def job():
"""
slack-reminderシートに書いてある通知をSlackに送る
"""

logger.info('Start slack-reminder job')

# 休みの日ならなにもしない
if holiday.is_holiday():
return

now = datetime.now()
# 全データを取得
values = google_sheets.get_all_values(SHEET_ID, 'reminder')
for value in values[:3]:
print(value)

0 comments on commit 5ebd929

Please sign in to comment.