仅做个人备忘录
ssh admin@***stabel.net
touch weekreport.sh
vi weekreport.sh
curl 'https://oapi.dingtalk.com/robot/send?access_token=a8d1f4c0d6e6b59510cc67404ae694c2de4c6d548567f91cb02a877170093ecc' \
-H 'Content-Type: application/json' \
-d '
{"msgtype": "text",
"text": {
"content": "重要的事说3遍:周五提前交周报,周五提前交周报,周五提前交周报。(BTW,不要太花时间,争取只花10分钟搞定)"
},
"at": {
"atMobiles": [
"",
""
],
"isAtAll": true
}
}'
chmod +x weekreport.sh
./weekreport.sh
每周五每小时执行一次
crontab -e
0 */1 * * 5 /home/admin/weekreport.sh
查询任务是否加了:
crontab -l