Merge pull request #420 from thsrite/main
This commit is contained in:
commit
57abc7816b
@ -127,7 +127,7 @@ class AutoSignIn(_PluginBase):
|
|||||||
crons = self._cron.strip().split("/")
|
crons = self._cron.strip().split("/")
|
||||||
if len(crons) == 2:
|
if len(crons) == 2:
|
||||||
# 2.3
|
# 2.3
|
||||||
self._cron = crons[0]
|
cron = crons[0]
|
||||||
# 9-23
|
# 9-23
|
||||||
times = crons[1].split("-")
|
times = crons[1].split("-")
|
||||||
if len(times) == 2:
|
if len(times) == 2:
|
||||||
@ -138,10 +138,10 @@ class AutoSignIn(_PluginBase):
|
|||||||
if self._start_time and self._end_time:
|
if self._start_time and self._end_time:
|
||||||
self._scheduler.add_job(func=self.sign_in,
|
self._scheduler.add_job(func=self.sign_in,
|
||||||
trigger="interval",
|
trigger="interval",
|
||||||
hours=float(self._cron.strip()),
|
hours=float(cron.strip()),
|
||||||
name=f"站点自动{self._action}")
|
name=f"站点自动{self._action}")
|
||||||
logger.info(
|
logger.info(
|
||||||
f"站点自动{self._action}服务启动,执行周期 {self._start_time}点-{self._end_time}点 每{self._cron}小时执行一次")
|
f"站点自动{self._action}服务启动,执行周期 {self._start_time}点-{self._end_time}点 每{cron}小时执行一次")
|
||||||
else:
|
else:
|
||||||
logger.error(f"站点自动{self._action}服务启动失败,周期格式错误")
|
logger.error(f"站点自动{self._action}服务启动失败,周期格式错误")
|
||||||
# 推送实时消息
|
# 推送实时消息
|
||||||
|
Loading…
x
Reference in New Issue
Block a user