Commit 4bdd915c authored by yaozheng's avatar yaozheng

增加流量线测试群提醒

parent e9ba60aa
......@@ -17,14 +17,14 @@ from apscheduler.schedulers.blocking import BlockingScheduler
def run():
scheduler = BlockingScheduler()
# 流量线值班人群里早上9:30提醒值班人值班
# scheduler.add_job(func=Task.zhiban, trigger='cron', hour=9, minute=30)
scheduler.add_job(func=Task.zhiban, trigger='cron', hour=9, minute=30)
# 测试群关键事项提醒,周一到周五的17:30
scheduler.add_job(func=Task.ceshi, trigger='cron', day_of_week='0-4', hour=17, minute=30)
scheduler.add_job(func=Task.ceshi, trigger='cron', day_of_week='0-4', hour=17, minute=35)
# 流量线值班人群里晚上18:00提醒值班人值班
# scheduler.add_job(func=Task.zhiban1, trigger='cron', hour=18)
scheduler.add_job(func=Task.zhiban1, trigger='cron', hour=18)
scheduler.start()
if __name__ == "__main__":
run()
run()
\ No newline at end of file
......@@ -65,20 +65,20 @@ class Task:
text = text + '\n> ***今天上线的需求都线上回归了吗?*** '
if currentday == 4:
text = text + '\n> ***测试周报都写了吗?*** [去写周报](http://cf.dui88.com/pages/viewpage.action?pageId=92507929) '
print('执行了')
Remind.send_markdown(token=token, secret=secret, title='下班前想一想', text=text, at=at)
@classmethod
def zhiban(cls):
zhibanren = [['赵杨晶', '18100175672'],
['吉月琳', '15372438813'],
['黄博涛', '13641464105'],
['达敏', '18658862085'],
['吴翠萍', '15201297871'],
['黄博涛', '13641464105'],
['吉月琳', '15372438813'],
['刘尖学', '18367117637'],
['蒋佳杰', '15957195421']]
token = '903ab8b3ba3d46e7c8b934ef83038bd6037e56c04a985e43fab8f2e0bd359cad'
secret = 'SEC7e57fbdd5b20103208482f520420139072d84c754a3cd624641623bd2f225af3'
token = '11a2ead9ca600cd09e5c69c35d9bcc9486cf0a777ef5fd3c3b81b483f7bb5476'
secret = 'SECc2b9a64a1af6cd3777eb1d4d8ce039f5c2be2cc49181e431421bbe5e701dd5c1'
# 获取当天日期
currentdate = datetime.date.today()
currentday = calendar.weekday(currentdate.year, currentdate.month, currentdate.day)
......@@ -95,12 +95,12 @@ class Task:
['黄博涛', '15726940779'],
['刘尖学', '18367117637'],
['蒋佳杰', '15957195421']]
token = '903ab8b3ba3d46e7c8b934ef83038bd6037e56c04a985e43fab8f2e0bd359cad'
secret = 'SEC7e57fbdd5b20103208482f520420139072d84c754a3cd624641623bd2f225af3'
token = '11a2ead9ca600cd09e5c69c35d9bcc9486cf0a777ef5fd3c3b81b483f7bb5476'
secret = 'SECc2b9a64a1af6cd3777eb1d4d8ce039f5c2be2cc49181e431421bbe5e701dd5c1'
# 获取当天日期
currentdate = datetime.date.today()
currentday = calendar.weekday(currentdate.year, currentdate.month, currentdate.day)
text = '@'+zhibanren[currentday][1]+',值班同学辛苦啦~ ' \
'\n> 不要忘记发值班日报并记录值班问题哦~ [去记录](http://cf.dui88.com/pages/viewpage.action?pageId=99955951) '
'\n> **不要忘记发值班日报并记录值班问题哦~** [去记录](http://cf.dui88.com/pages/viewpage.action?pageId=99955951) '
at = {'atMobiles': [zhibanren[currentday][1]]}
Remind.send_markdown(token, secret, '值班提醒', text, at)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment