I made 2 vb scripts. First one is start_vray_spawner, and second is stop_vray_spawner
first one:
Dim slaveNames
slavenames = SlaveUtils.GetSelectedSlaveNames()
For Each slaveName In slavenames
SlaveUtils.SendRemoteCommandNoWait slaveName, “C:\Program Files (x86)\Autodesk\3ds Max 9\vrayspawner90.exe”
Next
second one:
Dim slaveNames
slavenames = SlaveUtils.GetSelectedSlaveNames()
For Each slaveName In slavenames
SlaveUtils.SendRemoteCommandNoWait slaveName, “taskkill /im vrayspawner90.exe /f /t”
Next
Both scripts work if I execute just one of them, but if I start first script and it starts the vrayspawner on remote machine, and then when I start the second script (that should close vrayspawner) it waits until I manualy close vrayspawner on remote machine and then it executes (I’ve tried also with script that opens notepad on remote machine).
Same thing if I try to do it with Remote -> Exec Command.
So my question is:
How to execute more then one script, one after another?
I’m a little confused. You say that both scripts work if you execute them one at a time, but then you say that if you execute one followed by the other, the second doesn’t work? Are you combining these two scripts into a single script, and then the script gets stuck when running the second batch of remote commands? Sorry if I’m misunderstanding your problem.
Both scripts work if I for example execute just one of them and then manualy close vray spawner, and then execute second script, but as long as my vray spawner is open, the machine is not executing scripts that I sent to it.
One more example:
If I want to execute notpad, wordpad and comand prompt on remote machine so first I execute notpad, and when I try to execute wordpad it will not start, but if I manualy close notepad on remote machine thent it executes second script and starts wordpad. It’s allmost like it’s putting scripts on queue:)
This must be a bug in 2.7, because the scripts don’t appear to get stuck with Deadline 3.0 (ie: I can launch notepad and wordpad right after each other). However, there is a bug in 3.0 that prevents the SendRemoteCommandNoWait function from working, so we’re going to get that fixed for 3.1.