简易钉钉dingtalk群机器人发送消息

一行Linux命令搞定:

curl 'https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxc5ef' -H 'Content-Type: application/json' -d '{"msgtype": "text","text": {"content":"各位,记得吃回家吃饭哈"},"at":{"isAtAll":true}}'

添加到crontab中,实现每周四17:00定时发送:

0	17	*	*	4	/usr/bin/curl 'https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxac5ef' -H 'Content-Type: application/json' -d '{"msgtype": "text","text": {"content":"各位,记得吃饭哈。"},"at":{"isAtAll":true}}'

Tips:

at: 指@全员。

分享到:更多 ()