背景:每周都需要催促团队成员撰写周报,因此想到在全员群里面设置定时通知机器人
1.服务器创建目录 创建shell脚本
mkdir shell -创建shell目录存放sh脚本
vim dingding.sh -创建并且编写shell脚本
填入以下内容:
#!/bin/bash
curl 'https://oapi.dingtalk.com/robot/send?access_token=XXXX' -H 'Content-Type: application/json' -d '{"msgtype": "text", "text": { "content": "游泳健身了解一下" }, "at": {"atMobiles": ["xxxx"],"isAtAll": false}}'
具体入参可以查看
钉钉开放平台使用手册:
https://open-doc.dingtalk.com/docs