Fix: Multiple DLLs execute may fail due to a global variable
This commit is contained in:
@@ -48,17 +48,13 @@ public:
|
|||||||
|
|
||||||
// --- 2. 启动执行模式 (Mode 1) ---
|
// --- 2. 启动执行模式 (Mode 1) ---
|
||||||
if (p->Mode == SCH_MODE_STARTUP) {
|
if (p->Mode == SCH_MODE_STARTUP) {
|
||||||
static bool bSessionLocked = false;
|
// 检查时间间隔限制
|
||||||
if (bSessionLocked) return false;
|
|
||||||
|
|
||||||
if (p->Config.Startup.Interval > 0 && p->LastRunTime > 0) {
|
if (p->Config.Startup.Interval > 0 && p->LastRunTime > 0) {
|
||||||
unsigned __int64 diffSec = (now - p->LastRunTime) / 10000000ULL;
|
unsigned __int64 diffSec = (now - p->LastRunTime) / 10000000ULL;
|
||||||
if (diffSec < (unsigned __int64)p->Config.Startup.Interval) {
|
if (diffSec < (unsigned __int64)p->Config.Startup.Interval) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bSessionLocked = true;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user