Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Note: You may notice some temporary visual or styling issues in the Community. Our vendor is actively investigating.
cancel
Showing results for 
Search instead for 
Did you mean: 
b_guillien
Contributor
Contributor

Run a deployed job outside of TAC

Hello all,
In order to keep consistency between Talend operations and other server administration operations or batches, I must use an external scheduler to launch Talend's jobs.
However, I want to keep the "deployement" process given in the job conductor. I also want to keep the "regenerate job on change" feature.
So, I want to do the same action as pushing "Run" button in Job Conductor, but launched from my external scheduler : webservice would be great, I can also use script or command. What do I need to do ? what is the method to call ?

Thanks to all,
Labels (2)
5 Replies
Anonymous
Not applicable

Hi
The wiki article is a little old, written by one of our developer in 2008. The code of job conductor have been modified much, I am not sure the way of calling the task as a webservice anymore do still work.
After you deploy a task on job conductor, the job export script is sent to the folder:
<Job server install dir>\TalendJobServersFiles\repository
So, you can find the job script in this folder and execute it directly.
Best regards
Shong
_AnonymousUser
Specialist III
Specialist III

Hi all,
However, I want to keep the "deployement" process given in the job conductor. I also want to keep the "regenerate job on change" feature.
So, I want to do the same action as pushing "Run" button in Job Conductor, but launched from my external scheduler

I have exatly the same question than b.guillien, we will run jobs by command line via a scheduler, and we want to know if it's possible to see all information in TAC that we can see with a classic "run job" in TAC.
Thanks for you help!
Virginie
Anonymous
Not applicable

Hi Virginie
It is impossible to see which jobs have been deployed on Job conductor and are ready to run now on other scheduler or commandline, they are only seen in Talend TAC Page.
I am not sure what scheduler will you use, but you can execute the Talend job on remote jobserver in Talend commandline.
Best regards
Shong
_AnonymousUser
Specialist III
Specialist III

Hi shong,

Ok..... Thanks for your answer!
b_guillien
Contributor
Contributor
Author

Hi all,
I worked on the subject and arrived on a solution, maybe not the most efficient one, but it works.
I created a job LAUNCH (screen 1). This job :
1 - Access to TAC's H2 database to retrieve taskId using taskLabel entered in context (screen 2)
2 - Use webServiceInput to initiate a new session, and store the sessionId in context (screen 3)
3 - Use webServiceInput to Run the taskId (screen 4). I uses WSDL2Java to generate the appropriate routine, and advanced feature with following code :
routines.AdministratorWebService_PortType administratorWebService = new routines.AdministratorWebServiceServiceLocator().getAdministratorWebService();
routines.AdministratorWebServiceSoapBindingStub stub = (routines.AdministratorWebServiceSoapBindingStub) administratorWebService;
//stub.setSessionId (String sessionId);
//stub.setTaskId (int taskId);
//stub.setQueueIfNecessary (boolean queueIfNecessary);
//stub.setContextParams (String [][] contextParams);
//
//AxisProperties.setProperty("http.proxyHost", proxyHost);
//AxisProperties.setProperty("http.proxyPort", proxyPort);
//AxisProperties.setProperty("http.proxyUser", proxyUser);
//AxisProperties.setProperty("http.proxyPassword",proxyPassword);
String sessionId = context.FRWK_sessionId;
int taskId = Integer.parseInt(context.FRWK_taskId);
boolean queueIfNecessary = true;
String [][] contextParams = null;
administratorWebService.scheduleTaskForInstantRun(sessionId, taskId, queueIfNecessary, contextParams);

Note : for contextParams, i'm quite sure there is a good way to fill it with context value, but as my Java skills are low, any help would be appreciated 0683p000009MACJ.png
3bis - I add a tRunJob to a function that will wait for task to end (see 2 last screens)
4 - Use webServiceInput to close session (screen 5)
The job LAUNCH is then published as a webService.
From my scheduler, I call the job LAUNCH using http request, overriding the taskLabel contextParam with the name of a task that have been declared in the TAC.
I did not work on the status output (ERROR / SUCCESS) of this kind of call yet... 😕
I hope it will help 0683p000009MA9p.png