Hi, I am looking to run 1 or more tasks from a User Form interaction that will run either now, or at a specified time. I'm not sure the onTime facitlity will work for this.
For immediate run, I have code that contains:
Set objShell(x) = CreateObject("wscript.shell")
For x = 0 To numShells
For yy = 0 To numTasks - 1
If taskSet(yy).host = targetHosts(x) Then
objShell(x).Run taskSet(yy).RunScript, 1, False
End If
Next yy 'taskset
Next x 'shell
Where RunScript will launch a cmd window and perform some tasks with parameters specified by the user. (the basics of the loop are that it will be sending commands to different hosts, if the hosts are the same, the tasks will send one after another, rather than at the same time. If they are to different hosts, they will fire concurrently.
I can't seem to come up with a way to have this done given a specified time. Please help, Thank you in advance to everyone!
-chris
For immediate run, I have code that contains:
Set objShell(x) = CreateObject("wscript.shell")
For x = 0 To numShells
For yy = 0 To numTasks - 1
If taskSet(yy).host = targetHosts(x) Then
objShell(x).Run taskSet(yy).RunScript, 1, False
End If
Next yy 'taskset
Next x 'shell
Where RunScript will launch a cmd window and perform some tasks with parameters specified by the user. (the basics of the loop are that it will be sending commands to different hosts, if the hosts are the same, the tasks will send one after another, rather than at the same time. If they are to different hosts, they will fire concurrently.
I can't seem to come up with a way to have this done given a specified time. Please help, Thank you in advance to everyone!
-chris