Ok so bottom line I’m trying to sequence tasks without the use of Server Automation. I’ve worked out a way in which a task will pass a “token” from one server to the next which will then make each server with the “token” relevant to a baseline. The baseline will execute on each server in the order the token is passed.
Below is the action script for my “pass token” task. Every time I run it I get a relevance substitution error
on the “If” in section 5
below. I commented out everything after it just to make sure nothing else is causing the issue.
Here’s some of my observations:
a. The line works PERFECTLY when I try it in the Action Tab of the Fixlet Debugger. Moreover the entire Section 5 (without all the comment slashes) works perfectly when run from the Fixlet Debugger.
b. On some endpoints I’ve found that if the folder exists the task completes successfully, but on others even when the folder exists it still fails.
c. I put in a “pause while” the folder does not exist in Section 3 just to make sure it doesn’t get to the offending line unless the folder exists and I STILL get an error in the console and a “evaluation error” in the client logs.
d. The client log doesn’t even show it trying to check for the existence of the directory in order to create it or some of the other lines in the action script.
I’m going to step away from it for a day and see if time helps me see what I’m doing wrong. Can anyone see any glaring issues that I might be missing?
[ACTION SCRIPT BEGINS HERE]
// ====== 1 =======
download as ServerList.txt http://rootserver1.domain.com:52311/Uploads/SequencingTasks/ServerList.txt
pause while {not exists file "__Download\ServerList.txt"}
// ====== 2 =======
if {not exists folder (parent folder of regapp "BESClient.exe" as string & "\Sequencing")}
dos mkdir "{(parent folder of regapp "BESClient.exe" as string) & "\Sequencing"}"
dos copy /Y "{((client folder of current site) as string) & "\__Download\ServerList.txt"}" "{parent folder of regapp "BESClient.exe" as string & "\Sequencing\ServerList.txt"}"
else
dos copy /Y "{((client folder of current site) as string) & "\__Download\ServerList.txt"}" "{parent folder of regapp "BESClient.exe" as string & "\Sequencing\ServerList.txt"}"
endif
// ======3 =======
pause while {not exists (parent folder of regapp "BESClient.exe" as string) & "\Sequencing"}
// ====== 4 =======
if {not exists folder (parent folder of regapp "BESClient.exe" as string & "\Sequencing")}
dos mkdir "{(parent folder of regapp "BESClient.exe" as string) & "\Sequencing"}"
dos copy /Y "C:\temp\token.txt" "{parent folder of regapp "BESClient.exe" as string & "\Sequencing\token.txt"}"
else
dos copy /Y "C:\temp\token.txt" "{parent folder of regapp "BESClient.exe" as string & "\Sequencing\token.txt"}"
endif
// ====== 5 ======= ISSUE IS HERE:
if {(following text of first ((hostname as string & "==") as lowercase) of (concatenation "==" of lines of file "ServerList.txt" of folder "Sequencing" of (parent folder of regapp "BESClient.exe"))) does not equal "[EOF]"}
// dos net use w: \\{preceding text of first "==" of (following text of first ((hostname as string & "==") as lowercase) of (concatenation "==" of lines of file "ServerList.txt" of folder "Sequencing" of (parent folder of regapp "BESClient.exe")))}\c$ /user:localhost\administrator passw0rd
// parameter "start" = "{now}"
// pause while {now < ( (( parameter "start" of action ) as time ) + 15* second)}
// dos copy /Y "{(parent folder of regapp "BESClient.exe" as string) & "\Sequencing\token.txt"}" "W:\TEMP\token.txt"
// parameter "start1" = "{now}"
// pause while {now < ( (( parameter "start1" of action ) as time ) + 15* second)}
// dos del "c:\temp\token.txt"
// parameter "start2" = "{now}"
// pause while {now < ( (( parameter "start2" of action ) as time ) + 15* second)}
// dos net use w: /d
else
// No More Servers to Process
endif
[ACTION SCRIPT ENDS HERE]