I'm looking for someone to shed some light on the limitations of using tabcmd to run multiple sessions in parallel.
Is it possible to run parallel tabcmd session with a single user account ... or multiple user accounts?
It seems from my testing that using a single user causes all prior sessions to expire and fail to continue running.
It seems from my testing that using multiple users also causes all prior sessions (even running with another login account) to expire and fail to continue running.
Below is a detailed example.
My only possible solution (still to be tested) is to append the login information to every tabcmd command issued.
We have two schedules.
- Schedule #1 at 7am and generates 3 emails (each email uses tabcmd twice to get the png and pdf files).
- Schedule #2 to run every 15 minutes starting at 1 minute past the quarter hour. It generate a single png (takes 10 seconds)
In both cases, I use "tabcmd login -s ..." first and then use subsequent tabcmd commands to get the files. This meant that the subsequent tabcmd's were "Continuing previous sessions" each time the next file was requested. So for each schedule the tabcmd's executed look like this:
- Schedule #1
- (starts at 7:00:00am)
- tabcmd login
- tabcmd get png for email 1
- tabcmd get pdf for email 1
- tabcmd get png for email 2 -- fails somewhere around here depending on the time Schedule #2 starts
- tabcmd get pdf for email 2
- tabcmd get png for email 3
- tabcmd get pdf for email 3
- tabcmd logout
- (finish at 7:05:00am)
- Schedule #2
- (starts at 7:01:00am) -- one minute after the one above
- tabcmd login
- tabcmd get png
- tabcmd logout
- (finish at 7:01:10am)
Initially I was using the same account for tabcmd to run both using windows task scheduler.
... BUT ... I discovered that schedule #2 would cause the session started in schedule #1 to expire, causing scheudle #1 to attempt to create a new session using the initial account ... but this failed with the message "*** Tabcmd was run from a script or IDE but no password was provided. A password must be provided as an argument to tabcmd in order to log in."
I then tried the same thing using two account different accounts fore each schedule, but again the initial schedule failed .. and curiously when the initial session tried to create a new session, it attempted to use the SECOND login name to do so!
Maybe DOS is overwriting the variables from the credentials file?
|:: check for credentials file|
|if not exist %CredentialsFile% echo %CredentialsFile% file not found & goto :eof|
|echo ..... Reading credentials file .....|
|if "%TableauServer%"=="" echo TableauServer variable not set & goto :eof|
|if "%TableauUser%"=="" echo TableauUser variable not set & goto :eof|
|if "%TableauPassword%"=="" echo TableauPassword variable not set & goto :eof|
|:: login to server|
|if %nologin%==0 %tabcmdPATH%tabcmd login -s %TableauServer% -u %TableauUser% -p %TableauPassword% --no-certcheck|