How to run the MetaServlet action "runTask" with "taskName"


Can we run a task by its taskName, not by its taskId, as the taskId is not transparent on the TAC interface?



This action, runTask, exists in all supported versions of Talend products.



To read help information about scripts for calling MetaServlet actions in the Windows command line/Linux terminal, use the command:

MetaservletCaller.bat --tac-url=http:/ /IP_address:port/WebApplicationName --help CommandName


For runTask, it will be displayed as follows:

Command: runTask
Description             : Allows to run a task defined in Job conductor by its id. Mode can be 'asynchronous' or 'synchronous'
Requires authentication : true
Since                   : 4.2
Sample                  : 
  "actionName": "runTask",
  "authPass": "admin",
  "authUser": "",
  "mode": "synchronous",
  "taskId": 1
Specific error codes    : 
       30: Error while launching task
       31: Thread interupted while running
       32: No right to run this task
       33: The parameter 'mode' must have the value 'synchronous' or 'asynchronous'

Generic return codes    : 
       0: Success
       1: Unknown error
       2: Invalid request
       3: Authentication error
       4: License problem
       5: Invalid parameter
       6: Error formatting response



Since taskId is not transparent on TAC interface, you can do one of the following:

  • Make it visible in the TAC Job conductor view.


  • Or use getTaskByName:


    Then use runTask:



    Also, for the external scheduler, it has to parse the JSON expression from getTaskIdByName and call runTask with additional arguments.


Related Jira Issues

TMC-6160 Run MetaServlet "runTask" with "taskName"


Bookshelf references

For more details on Metaservlet actions, refer to the online documentation:

Non-GUI operation in metaServlet

Version history
Revision #:
6 of 6
Last update:
‎05-16-2017 08:05 PM
Updated by:
Labels (1)
Tags (1)