One Star

Problem with running commandline in script mode

Talend Integration Suite 4.2.2 Professional, running on Windows Servers 2003 R2, using SQL Server databases.
I am trying to script exporting a job.
I have successfully run the following commands using shell mode:
initRemote http://eh-app-d04:8080/org.talend.administrator
logonProject -pn Dev -ul mylogon -up mypassword
exportJob CDC_Main -dd f:\Talend\ -jv 0.1 -jc Default -af Export_CDC_Main_script
I have copied these to a scriptfile - c:\temp\CommandlineScript
I then run the following:
"C:\Program Files\Talend\Talend-All-r63143-V4.2.2\Talend-win32-x86.exe" -nosplash -application org.talend.commandline.CommandLine -consoleLog -data commandline-workspace scriptFile c:\temp\CommandlineScript
The command line workspace window appears, and all of the Eclipse start up messages appear, but then the window closes (note there is no sign of any help data, so I assume that the commands are being recognised as valid). The output file is not produced, and as the window closes there is no log information.
Two questions:-
1) is it possible to redirect the output to a file?
2) can you offer any advice on where I'm going wrong?
Note - even when the commands are running successfully in shell mode, there is no evidence of this in the TAC Commandline page - is this correct?

Re: Problem with running commandline in script mode

In a default export, after the export there's usually a logoffProject step. You should try to add it and see if it helps.
One Star

Re: Problem with running commandline in script mode

Hi Vincent,
I tried this and it made no difference. I manage to take a screenshot of the commandline window as it closed - i've tried uploading it and my posty doen't appear - however the last lines of it are
!ENTRY org.talend.commandline 1 0 2011-10-12 09:01:45:558
!MESSAGE Shutting down Command Line Application

My 2 two questions still remain:
1) Can the output from the commandline be redirected, so that any error messages can be captured and investigated?
2) Should these commandline commands (including successful launch of the application) be logged in the TAC Command Line tab?

Re: Problem with running commandline in script mode

Hi Dave,
1- Yes they are, actually in your commandline workspace folder defined in the execution attributes go to the .metadata folder, then there should be a .log file in there.
2- You should see the commands in the CommandLine tab in TAC, if not, either your TAC can't connect to the CommandLine, or something is wrong in the CommnandLine. Check in the Configuration tab if the CommandLine is green!