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

results matching ""

    No results matching ""