Documentation
¶
Overview ¶
dailyTask
dailyTask
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( APPID = "wxb547e7b33f80bb5a" APPSECRET = "4ff76e73733313eb2f2a88789cc6c4db" SentTemplateID = "8n_ebZSs6EV9tKJ8K484ISdVcntGO4A-TDZ23mu0RJw" //每日一句的模板ID,替换成自己的 )
View Source
var JobPutDownComputerAndPhone = func() { PutDownComputerAndPhone() }
View Source
var JobSleepNow = func() { ShutDownPc() }
View Source
var JobStandUpFun = func() { sysType := runtime.GOOS if sysType == "windows" { NotifyStadnUpWindos() } }
View Source
var SleepTrip = func() { EverydaySleep() }
Functions ¶
func NotifyStadnUp ¶
func NotifyStadnUp()
*
消息通知弹框
https://github.com/gen2brain/beeep https://github.com/0xAX/notificator https://github.com/go-toast/toast https://github.com/ying32/govcl https://zhuanlan.zhihu.com/p/404062419 *
func NotifyStadnUpWindos ¶
func NotifyStadnUpWindos()
func PostGeekTime ¶
func PostGeekTime()
func PutDownComputerAndPhone ¶
func PutDownComputerAndPhone()
习惯:不拖堂 20点远离手机和电脑 -s"正常关机、"-f"强制关机、"-r"重启、"-t"定时关机 shutdown -h 休眠
Types ¶
type DailyAction ¶
type DailyAction struct {
Name string
}
*
1. 完整框架:https://github.com/ouqiang/gocron 2. 只有后端服务端的定时器 https://pkg.go.dev/github.com/robfig/cron 3. https://blog.csdn.net/sryan/article/details/50129133 4. 用法:https://github.com/eddycjy/go-gin-example/tree/master/service/article_service
*
func (*DailyAction) StartCron ¶
func (da *DailyAction) StartCron()
Click to show internal directories.
Click to hide internal directories.