<增加定时打卡提醒>

This commit is contained in:
ubuntu 2022-10-08 20:17:53 +08:00
parent ce45a07715
commit fa40c5691d
4 changed files with 9 additions and 3 deletions

View File

@ -77,8 +77,14 @@ func SchoolSignInBegin(msg *openwechat.Message, self *openwechat.Self) {
spec := "0 0 9 * * ?" //cron表达式每天9点 spec := "0 0 9 * * ?" //cron表达式每天9点
spec1 := "0 10 9 * * ?" //cron表达式每天9点 spec1 := "0 10 9 * * ?" //cron表达式每天9点
spec2 := "0 11 22 * * ?" //cron表达式每天9点 spec2 := "0 11 22 * * ?" //cron表达式每天9点
spec3 := "0 0 7 * * ?" //cron表达式每天9点
spec4 := "1 0 7 * * ?" //cron表达式每天9点
spec5 := "2 0 7 * * ?" //cron表达式每天9点
// 添加定时任务, // 添加定时任务,
crontab.AddFunc(spec, task) crontab.AddFunc(spec, task)
crontab.AddFunc(spec3, task)
crontab.AddFunc(spec4, task)
crontab.AddFunc(spec5, task)
crontab.AddFunc(spec1, task1) crontab.AddFunc(spec1, task1)
crontab.AddFunc(spec2, task2) crontab.AddFunc(spec2, task2)
// 启动定时器 // 启动定时器

BIN
main

Binary file not shown.

View File

@ -64,10 +64,10 @@ func main() {
controller.SignIn(msg, self) controller.SignIn(msg, self)
} }
if split[0] == "school" || split[1] == "start" { if split[0] == "school" && split[1] == "start" {
controller.SchoolSignInBegin(msg, self) controller.SchoolSignInBegin(msg, self)
} }
if split[0] == "school" || split[1] == "end" { if split[0] == "school" && split[1] == "end" {
controller.SignInEnd(msg, self, "四大天王") controller.SignInEnd(msg, self, "四大天王")
} }

View File

@ -1 +1 @@
{"Cookies":{"https://login.wx.qq.com/cgi-bin/mmwebwx-bin/login":[],"https://login.wx.qq.com/jslogin":[],"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxinit":[],"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxnewloginpage":[{"Name":"wxuin","Value":"2194844303","Path":"/","Domain":"wx2.qq.com","Expires":"2022-09-27T23:12:51Z","RawExpires":"Tue, 27-Sep-2022 23:12:51 GMT","MaxAge":0,"Secure":true,"HttpOnly":false,"SameSite":0,"Raw":"wxuin=2194844303; Domain=wx2.qq.com; Path=/; Expires=Tue, 27-Sep-2022 23:12:51 GMT; Secure","Unparsed":null},{"Name":"wxsid","Value":"cJddqrjlsYOkSKFB","Path":"/","Domain":"wx2.qq.com","Expires":"2022-09-27T23:12:51Z","RawExpires":"Tue, 27-Sep-2022 23:12:51 GMT","MaxAge":0,"Secure":true,"HttpOnly":false,"SameSite":0,"Raw":"wxsid=cJddqrjlsYOkSKFB; Domain=wx2.qq.com; Path=/; Expires=Tue, 27-Sep-2022 23:12:51 GMT; Secure","Unparsed":null},{"Name":"wxloadtime","Value":"1664277171","Path":"/","Domain":"wx2.qq.com","Expires":"2022-09-27T23:12:51Z","RawExpires":"Tue, 27-Sep-2022 23:12:51 GMT","MaxAge":0,"Secure":true,"HttpOnly":false,"SameSite":0,"Raw":"wxloadtime=1664277171; Domain=wx2.qq.com; Path=/; Expires=Tue, 27-Sep-2022 23:12:51 GMT; Secure","Unparsed":null},{"Name":"mm_lang","Value":"zh_CN","Path":"/","Domain":"wx2.qq.com","Expires":"2022-09-27T23:12:51Z","RawExpires":"Tue, 27-Sep-2022 23:12:51 GMT","MaxAge":0,"Secure":true,"HttpOnly":false,"SameSite":0,"Raw":"mm_lang=zh_CN; Domain=wx2.qq.com; Path=/; Expires=Tue, 27-Sep-2022 23:12:51 GMT; Secure","Unparsed":null},{"Name":"wxuin","Value":"2194844303","Path":"/","Domain":".qq.com","Expires":"2022-09-27T23:12:51Z","RawExpires":"Tue, 27-Sep-2022 23:12:51 GMT","MaxAge":0,"Secure":true,"HttpOnly":false,"SameSite":0,"Raw":"wxuin=2194844303; Domain=.qq.com; Path=/; Expires=Tue, 27-Sep-2022 23:12:51 GMT; Secure","Unparsed":null},{"Name":"webwx_data_ticket","Value":"gSd3qRiChtPzcfoWLKEmi0yT","Path":"/","Domain":".qq.com","Expires":"2022-09-27T23:12:51Z","RawExpires":"Tue, 27-Sep-2022 23:12:51 GMT","MaxAge":0,"Secure":true,"HttpOnly":false,"SameSite":0,"Raw":"webwx_data_ticket=gSd3qRiChtPzcfoWLKEmi0yT; Domain=.qq.com; Path=/; Expires=Tue, 27-Sep-2022 23:12:51 GMT; Secure","Unparsed":null},{"Name":"webwxuvid","Value":"5cf0b407ddf07b6c70417c0b21bcfff9a37263eaa2aea15929b5a482b771b2cac35674c0780671f8e7a2897804e3e43d","Path":"/","Domain":"wx2.qq.com","Expires":"2032-09-24T11:12:51Z","RawExpires":"Fri, 24-Sep-2032 11:12:51 GMT","MaxAge":0,"Secure":true,"HttpOnly":false,"SameSite":0,"Raw":"webwxuvid=5cf0b407ddf07b6c70417c0b21bcfff9a37263eaa2aea15929b5a482b771b2cac35674c0780671f8e7a2897804e3e43d; Domain=wx2.qq.com; Path=/; Expires=Fri, 24-Sep-2032 11:12:51 GMT; Secure","Unparsed":null},{"Name":"webwx_auth_ticket","Value":"CIsBEOvbs/gBGoAB1f876Xq28PjLpJkew4ZmbtvAr98TGctTy/UR5nB2zCLi7ndb0vpAetTyM+MW9Rt0Zhgz5A8unE96TXkHZKEspTK4EfQfAQ98OHhjN6Lx3Z/OIQN/AnRKGpH5iBfCYunEmP4IrgmjfgdUxuyEFq7jvoXN7qzdQirDhCty1te7s7s=","Path":"/","Domain":"wx2.qq.com","Expires":"2032-09-24T11:12:51Z","RawExpires":"Fri, 24-Sep-2032 11:12:51 GMT","MaxAge":0,"Secure":true,"HttpOnly":false,"SameSite":0,"Raw":"webwx_auth_ticket=CIsBEOvbs/gBGoAB1f876Xq28PjLpJkew4ZmbtvAr98TGctTy/UR5nB2zCLi7ndb0vpAetTyM+MW9Rt0Zhgz5A8unE96TXkHZKEspTK4EfQfAQ98OHhjN6Lx3Z/OIQN/AnRKGpH5iBfCYunEmP4IrgmjfgdUxuyEFq7jvoXN7qzdQirDhCty1te7s7s=; Domain=wx2.qq.com; Path=/; Expires=Fri, 24-Sep-2032 11:12:51 GMT; Secure","Unparsed":null}],"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxstatusnotify":[]},"BaseRequest":{"Uin":2194844303,"Sid":"cJddqrjlsYOkSKFB","Skey":"@crypt_f512dfa9_e7c39c94b255a55cab657fc5f65f36f1","DeviceID":"e313858166440063"},"LoginInfo":{"Ret":0,"WxUin":2194844303,"IsGrayScale":1,"Message":"","SKey":"@crypt_f512dfa9_e7c39c94b255a55cab657fc5f65f36f1","WxSid":"cJddqrjlsYOkSKFB","PassTicket":"tL00Gpk52zf0ECxZ2bbuUWy9nurKKsSgNnlo%2Far57%2FmyvhjH0FFaWvzruynK%2BZ7U"},"WechatDomain":"wx2.qq.com","UUID":"wfFUsCeQnQ=="} {"Cookies":{"https://login.wx.qq.com/cgi-bin/mmwebwx-bin/login":[],"https://login.wx.qq.com/jslogin":[],"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxinit":[],"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxnewloginpage":[{"Name":"wxuin","Value":"2194844303","Path":"/","Domain":"wx2.qq.com","Expires":"2022-10-04T13:05:38Z","RawExpires":"Tue, 04-Oct-2022 13:05:38 GMT","MaxAge":0,"Secure":true,"HttpOnly":false,"SameSite":0,"Raw":"wxuin=2194844303; Domain=wx2.qq.com; Path=/; Expires=Tue, 04-Oct-2022 13:05:38 GMT; Secure","Unparsed":null},{"Name":"wxsid","Value":"EPQzoP7IxyCHyMY0","Path":"/","Domain":"wx2.qq.com","Expires":"2022-10-04T13:05:38Z","RawExpires":"Tue, 04-Oct-2022 13:05:38 GMT","MaxAge":0,"Secure":true,"HttpOnly":false,"SameSite":0,"Raw":"wxsid=EPQzoP7IxyCHyMY0; Domain=wx2.qq.com; Path=/; Expires=Tue, 04-Oct-2022 13:05:38 GMT; Secure","Unparsed":null},{"Name":"wxloadtime","Value":"1664845538","Path":"/","Domain":"wx2.qq.com","Expires":"2022-10-04T13:05:38Z","RawExpires":"Tue, 04-Oct-2022 13:05:38 GMT","MaxAge":0,"Secure":true,"HttpOnly":false,"SameSite":0,"Raw":"wxloadtime=1664845538; Domain=wx2.qq.com; Path=/; Expires=Tue, 04-Oct-2022 13:05:38 GMT; Secure","Unparsed":null},{"Name":"mm_lang","Value":"zh_CN","Path":"/","Domain":"wx2.qq.com","Expires":"2022-10-04T13:05:38Z","RawExpires":"Tue, 04-Oct-2022 13:05:38 GMT","MaxAge":0,"Secure":true,"HttpOnly":false,"SameSite":0,"Raw":"mm_lang=zh_CN; Domain=wx2.qq.com; Path=/; Expires=Tue, 04-Oct-2022 13:05:38 GMT; Secure","Unparsed":null},{"Name":"wxuin","Value":"2194844303","Path":"/","Domain":".qq.com","Expires":"2022-10-04T13:05:38Z","RawExpires":"Tue, 04-Oct-2022 13:05:38 GMT","MaxAge":0,"Secure":true,"HttpOnly":false,"SameSite":0,"Raw":"wxuin=2194844303; Domain=.qq.com; Path=/; Expires=Tue, 04-Oct-2022 13:05:38 GMT; Secure","Unparsed":null},{"Name":"webwx_data_ticket","Value":"gScltan9duBM3UAm7Iz7vTMY","Path":"/","Domain":".qq.com","Expires":"2022-10-04T13:05:38Z","RawExpires":"Tue, 04-Oct-2022 13:05:38 GMT","MaxAge":0,"Secure":true,"HttpOnly":false,"SameSite":0,"Raw":"webwx_data_ticket=gScltan9duBM3UAm7Iz7vTMY; Domain=.qq.com; Path=/; Expires=Tue, 04-Oct-2022 13:05:38 GMT; Secure","Unparsed":null},{"Name":"webwx_auth_ticket","Value":"CIsBELfY348HGoAB1bEXeXSExPlTveEHTYfIRtvAr98TGctTy/UR5nB2zCLi7ndb0vpAetTyM+MW9Rt0Zhgz5A8unE96TXkHZKEspTK4EfQfAQ98OHhjN6Lx3Z/OIQN/AnRKGpH5iBfCYunEntxKCjKO69/58hmSbNfl+sP//TALpLd55Y/iDxswwgU=","Path":"/","Domain":"wx2.qq.com","Expires":"2032-10-01T01:05:38Z","RawExpires":"Fri, 01-Oct-2032 01:05:38 GMT","MaxAge":0,"Secure":true,"HttpOnly":false,"SameSite":0,"Raw":"webwx_auth_ticket=CIsBELfY348HGoAB1bEXeXSExPlTveEHTYfIRtvAr98TGctTy/UR5nB2zCLi7ndb0vpAetTyM+MW9Rt0Zhgz5A8unE96TXkHZKEspTK4EfQfAQ98OHhjN6Lx3Z/OIQN/AnRKGpH5iBfCYunEntxKCjKO69/58hmSbNfl+sP//TALpLd55Y/iDxswwgU=; Domain=wx2.qq.com; Path=/; Expires=Fri, 01-Oct-2032 01:05:38 GMT; Secure","Unparsed":null}],"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxstatusnotify":[]},"BaseRequest":{"Uin":2194844303,"Sid":"EPQzoP7IxyCHyMY0","Skey":"@crypt_f512dfa9_e59cfb13b99cab886a7791d5ebc47588","DeviceID":"e645681736316510"},"LoginInfo":{"Ret":0,"WxUin":2194844303,"IsGrayScale":1,"Message":"","SKey":"@crypt_f512dfa9_e59cfb13b99cab886a7791d5ebc47588","WxSid":"EPQzoP7IxyCHyMY0","PassTicket":"SRn505Jx0egg9URdx0%2ByiTLXLOfKeMV84xipC0genmDim1oxmu2Kr2rx3fbH%2Fw18"},"WechatDomain":"wx2.qq.com","UUID":"IYHYq7hszg=="}