Fix: Multiple DLLs execute may fail due to a global variable
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user