Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Preventing second run of the application
Message
 
 
To
All
General information
Forum:
C#
Category:
Coding, syntax and commands
Title:
Preventing second run of the application
Miscellaneous
Thread ID:
01677464
Message ID:
01677464
Views:
52
Hi everybody,

I'm trying to figure out what is the best way to not run an application the second time within 2 minutes from the first run of it in C# code. In my application log I can see

********************************************************************************
12/7/2020 7:15:23 AM: Beginning Execution of SomeFile.exe.
12/7/2020 7:15:24 AM: Program ending successfully.
********************************************************************************

12/7/2020 7:16:52 AM: Beginning Execution of SomeFile.exe.
12/7/2020 7:16:53 AM: Program ending successfully.
********************************************************************************

The way everything is setup (though the Window Scheduler job running packages, etc.) is quite complex, so I cannot change the whole setup. I'm just wondering what may be the best way to prevent second run of that application if it happens within the minutes of the previous run?

What do you think I should use as the detection approach?

Thanks in advance.

------------------------
Also, by looking into the log file I can see that an error (if it happens) always happen at the exact same time: 1:45am in the morning. Do you know what may typically run at that time and how should I find out?
If it's not broken, fix it until it is.


My Blog
Reply
Map
View

Click here to load this message in the networking platform