Is there a setting in scheduled tasks that can say dont run if process is still running?
Printable View
Is there a setting in scheduled tasks that can say dont run if process is still running?
I would schedule a batch file that first calls an exe to check the process,
If the process is not running, call the task from the exe. If it isn't, just exit it.
I don't think you can do it any better way with the task scheduler.
By the way the task is a vbscript.
That sounds like a good idea,
How do i check if a vbscript is running from another vbscript?
Thanks.
Have one script write a byte or two to a file, and delete it when it's done.
The other script could check for that file every few seconds if need be.
Do you know how to call a vbscript from within another VBScript??
Thanks,
I haven't used VBS in a while, but you can try the Shell(file_full_location as string) function. I think it works fine for non-EXE files, but I can't test at the moment. Good luck!
You need to call cmd first, like this:
VB Code:
Option Explicit Private Sub Form_Load() Shell ("C:\Windows\System32\cmd.exe /c d:\scripts\timezone.vbs "), vbNormalFocus End Sub