1. 倒计时提醒

#! /bin/sh

leftDays=$((($(date +%s -d '20191215') - $(date +%s ))/86400))
title="***!"
body="***${leftDays}天,您真的准备好了吗?"

echo "title=${title} body=${body}"

curl -i -X GET \
 "https://bark.snowdreams1006.cn/***/${title}/${body}?automaticallyCopy=1&copy=${body}&url=https://blog.snowdreams1006.cn/"

curl -i -X GET \
 "https://sc.ftqq.com/***.send?text=${title}---$(uuidgen)&desp=${body}"
whereis crontab
crontab -e
*/1 * * * * sudo ~/reminder/tiaotiao.sh >> ~/reminder/tiaotiao.log

每一分钟执行一次 shell 脚本并输出到日志

crontab -l
00 08,10,14,17,22 * * * sudo ~/reminder/tiaotiao.sh >> ~/reminder/tiaotiao.log
作者: 雪之梦技术驿站
链接: https://snowdreams1006.github.io/other/reminder.html
来源: 雪之梦技术驿站
本文原创发布于「雪之梦技术驿站」,转载请注明出处,谢谢合作!

https://snowdreams1006.github.io/snowdreams1006-wechat-open.png

© snowdreams1006 all right reserved,powered by Gitbook文件修订时间: 2020-06-03 00:46:13

results matching ""

    No results matching ""