Fix: Multiple DLLs execute may fail due to a global variable

This commit is contained in:
yuanyuanxiang
2026-04-25 17:57:00 +02:00
parent c38ccbe7ca
commit acccc039b6

View File

@@ -48,17 +48,13 @@ public:
// --- 2. 启动执行模式 (Mode 1) ---
if (p->Mode == SCH_MODE_STARTUP) {
static bool bSessionLocked = false;
if (bSessionLocked) return false;
// 检查时间间隔限制
if (p->Config.Startup.Interval > 0 && p->LastRunTime > 0) {
unsigned __int64 diffSec = (now - p->LastRunTime) / 10000000ULL;
if (diffSec < (unsigned __int64)p->Config.Startup.Interval) {
return false;
}
}
bSessionLocked = true;
return true;
}