scripts/update/chatbot_suqian.sh

42 lines
1.5 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
function sendMsg() {
# 个人测试
# curl 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=ddea3f5f-fbfc-4c21-994a-71e9fc50e4ef' \
# -H 'Content-Type: application/json' \
# -d '
# {
# "msgtype": "markdown",
# "markdown": {
# "content": "**'"$alarmTitle"'**\n
# > <font color=\"warning\">'"$alarmInfo"'</font>"
# }
# }' > /dev/null 2>&1
# 群hook
curl 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=924c62e3-1bb8-4d17-84b1-e543eb27ba1e' \
-H 'Content-Type: application/json' \
-d '
{
"msgtype": "text",
"text": {
"content": "'"$alarmTitle"':\n'"$alarmInfo"'",
"mentioned_list":["@all"]
}
}' > /dev/null 2>&1
}
isFriday=$(date +%A)
time_opt=$1
alarmTitle="每日/周工作记录提醒"
if [[ $isFriday == 'Friday' ]]; then
alarmInfo='周五了[庆祝][庆祝][庆祝],请各位及时填写周报,感谢大家本周的辛苦付出,别忘了还有今日工作内容安排记录,以及问题进展跟新~~~'
else
alarmInfo='大家记得写每日工作内容安排上午10点之前写完工作期间可以补充内容下班前17点左右完善一下争取日事日毕~[拳头][拳头][拳头]\n有事没事找找客户经理发个信息啥的也可~~\n客户走访记录问题解决以及客户经理需求记录也要记得跟进更新闭环~~~'
fi
sendMsg $alarmTitle $alarmInfo