mirror of
https://github.com/thsrite/MoviePilot-Plugins.git
synced 2026-05-23 07:16:44 +00:00
fix 修复多个任务立即运行一次
This commit is contained in:
@@ -83,11 +83,6 @@ class CustomCommand(_PluginBase):
|
||||
tz=pytz.timezone(settings.TZ)) + timedelta(seconds=3),
|
||||
name=name,
|
||||
args=[name, command])
|
||||
# 关闭一次性开关
|
||||
self._onlyonce = False
|
||||
|
||||
# 保存配置
|
||||
self.__update_config()
|
||||
else:
|
||||
try:
|
||||
self._scheduler.add_job(func=self.__execute_command,
|
||||
@@ -102,6 +97,11 @@ class CustomCommand(_PluginBase):
|
||||
else:
|
||||
logger.error(f"{time_conf} 配置错误,跳过处理")
|
||||
|
||||
if self._onlyonce:
|
||||
# 关闭一次性开关
|
||||
self._onlyonce = False
|
||||
# 保存配置
|
||||
self.__update_config()
|
||||
# 启动任务
|
||||
if self._scheduler.get_jobs():
|
||||
self._scheduler.print_jobs()
|
||||
|
||||
Reference in New Issue
Block a user