|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Multiple instances of executables?Multiple instances of executables?
I want to schedule task in "Schedule tasks" that starts an app (build in vb.net 2005) every 5 minutes. Every time the app starts i want to check if this job with the same task name, task name is passed as an argument to the app at start, is completed. If its not completed, just quit. Schedule tasks: ========== myApp.exe "TaskNameOne" myApp.exe "TaskNameTwo" myApp.exe "TaskNameThree" How can i check if the "taskname" is already running? Thanks in advance! Hi Grundh,
Welcome to MSDN Newsgroup! Based on my knowledge, you can use the following way as a workaround for this issue: When your application starts, you can write the CommandLine Argument to the registry (under a specified registry path). And when the application quits, remove the Command Line Argument from the registry. If we want to check whether a "taskname" is already running, we can query this information from the registry. I hope the above information is helpful for you. Thanks and have a nice day! Best Regards, Terry Fei [MSFT] Microsoft Community Support Get Secure! www.microsoft.com/security -------------------- Show quote >Thread-Topic: Multiple instances of executables? >thread-index: AcY4kbUle0M+WENiSVSmo8pMCZoxig== >X-WBNR-Posting-Host: 212.214.0.2 >From: "=?Utf-8?B?TXJHcnVuZGg=?=" <MrGrundh@nospam.nospam> >Subject: Multiple instances of executables? >Date: Thu, 23 Feb 2006 07:56:28 -0800 >Lines: 18 >Message-ID: <F8EC9A25-C5C9-4D4D-8D21-6A8832D89***@microsoft.com> >MIME-Version: 1.0 >Content-Type: text/plain; > charset="Utf-8" >Content-Transfer-Encoding: 7bit >X-Newsreader: Microsoft CDO for Windows 2000 >Content-Class: urn:content-classes:message >Importance: normal >Priority: normal >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0 >Newsgroups: microsoft.public.dotnet.framework >NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250 >Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl >Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.framework:109140 >X-Tomcat-NG: microsoft.public.dotnet.framework > >Multiple instances of executables? > >I want to schedule task in "Schedule tasks" that starts an app (build in >vb.net 2005) every 5 minutes. Every time the app starts i want to check if >this job with the same task name, task name is passed as an argument to the >app at start, is completed. If its not completed, just quit. > >Schedule tasks: >========== >myApp.exe "TaskNameOne" >myApp.exe "TaskNameTwo" >myApp.exe "TaskNameThree" > >How can i check if the "taskname" is already running? > >Thanks in advance! > > > |
|||||||||||||||||||||||