Skip to main content Skip to complementary content

Adding an execution task to an artifact

With this procedure, Talend Administration Center is able to fetch all Jobs in a continuous way- even after the database is restored on a new server.

The Talend Administration Center also allows you to add execution tasks to Jobs that are retrieved on the Nexus artifact repository at execution time, or pre-published via the Publisher page.

Information noteNote: With this procedure, Talend Administration Center is able to fetch all Jobs in a continuous way- even after the database is restored on a new server.

Before you begin

  • The parameters to connect to the Nexus artifact repository are filled in the Artifact Repository node of the Configuration page. For more information, see Setting up the artifact repository parameters.
  • The Job you want to add has been previously published to the Nexus artifact repository from the Studio.
  • Unix only: If you want to execute the Job as a specific Operating System user (Run Job as OS user option), this user must already exist in the system, he must have the right umask and some server directories must have been given specific permissions. For more information, see Configuring user impersonation for Talend JobServer.
    Information noteTip: By default, the user name must start with a lower-case letter from a to z, followed by a combination of lower-case letters (a to z) and numbers (from 0 to 9). To allow using characters other than those letters and numbers, you need to modify the regular expression ^[a-z][-a-z0-9]*\$ in the value of the org.talend.remote.jobserver.server.TalendJobServer.RUN_AS_USER_VALIDATION_REGEXP parameter in the file {Job_Server_Installation_Folder}\agent\conf\TalendJobServer.properties. For example:
    • To define a user name pattern that should include a dot, like firstname.lastname, modify the regular expression to ^[a-z][-a-z0-9]*.[a-z][-a-z0-9]*\$.
    • To allow using one or more underscores (_) in the user name, modify the regular expression to ^[a-z][-a-z_0-9]*\$.

Procedure

  1. From the toolbar on the Job Conductor page, click Add > Artifact Task to display the Execution task configuration panel.

    Example

    Example

  2. Enter/select the following information as necessary.

    Field

    Description

    Label

    Name of the task to be triggered.

    Description

    Provides any useful information regarding the task to be carried out.

    Active

    Select/clear this check box to activate/deactivate this task.

    Job

    Click the Artifact repository button icon to open the Select artifact from Artifact repository window. This window allows you to link dynamically the Job artifact and to associate it to the task, knowing that this artifact is only retrieved at execution time.

    In the Repository list, select the repository in which the Job is published. In the Browse panel, browse to the Job you want to associate with the task then click OK to close the window.

    OR:

    Click the Publisher button to retrieve the publishing task created from the Publisher page. Details of the artifact are then automatically completed in the form. For more information on publishing tasks, see Working with publishing tasks.

    Project

    The project containing the artifact to be executed. This field is automatically completed and is read-only.

    Branch

    The SVN (deprecated)/GIT branch/tag, if any is created, of the project containing the artifact to be executed. For more information about projects stored on SVN (deprecated) or GIT, see Managing SVN/Git branches and tags for a project. This field is automatically completed and is read-only.

    Repository

    Repository in which the artifact is published. This field is automatically completed and is read-only.

    Group ID

    Name of the group in which the artifact is published. This field is automatically completed and is read-only.

    Artifact

    Name of the artifact item. This field is automatically completed and is read-only.

    From this field, you can select both Standard and Big Data Batch Jobs (Map/Reduce and Spark), according to your license.

    Publish Version

    Version of the artifact to be executed. This field is automatically completed and is read-only.

    Use Latest Version

    If there are several versions of the same artifact, select this check box in order to automatically execute the latest version of the selected artifact.

    Context

    Context to be applied to the execution task. This field is automatically completed.

    Apply context to children

    This field is automatically completed and is read-only. It can be set when the Job is published from the Studio as a standalone Job.

    Log4j Level

    Select the level of log you want to apply to the execution task. The levels are ranked in increasing order of severity, from TRACE (most detailed information) to OFF (logs turned off).

    Execution server

    Select the server on which the task should be deployed.

    If the relevant server does not display on the list, check the Servers page and make sure the server is correctly configured. For more information regarding the execution server configuration, see Configuring execution servers.

    The list of execution servers offers virtual servers corresponding to physical servers grouped together. For details about Virtual Servers, see Configuring virtual servers.

    Run Job as OS user (Unix)

    (Unix only)

    Enter the name of the Operating System user who is allowed to start the Job execution, root for example:

    • If the field is empty, any user is allowed to execute the Job. Note that these users must correspond to existing Operating System users.
    • To restrict this right to specific users, edit the list of allowed users in the following file:

      <JobServerInstallationDirectory>/conf/TalendJobServer.properties

    • You need to give the right umask to your user as well as specific permissions to the server directories to use this feature.
    Information noteTip: By default, the user name must start with a lower-case letter from a to z, followed by a combination of lower-case letters (a to z) and numbers (from 0 to 9). To allow using characters other than those letters and numbers, you need to modify the regular expression ^[a-z][-a-z0-9]*\$ in the value of the org.talend.remote.jobserver.server.TalendJobServer.RUN_AS_USER_VALIDATION_REGEXP parameter in the file {Job_Server_Installation_Folder}\agent\conf\TalendJobServer.properties. For example:
    • To define a user name pattern that should include a dot, like firstname.lastname, modify the regular expression to ^[a-z][-a-z0-9]*.[a-z][-a-z0-9]*\$.
    • To allow using one or more underscores (_) in the user name, modify the regular expression to ^[a-z][-a-z_0-9]*\$.

    Statistic

    This field is automatically completed and is read-only. It is either:

    • enabled (read and write) if you enabled the statistics during the generation of the Job;
    • disabled (read and write) if you deactivated the statistics during the generation of the Job.

    On unavailable JobServer

    This option is part of the failover process provided by Talend. and allows you to decide what action you want to take on the selected task when the server is unavailable during a predetermined period of time (defined in Adding an execution server).

    Select one of the following from the list:

    • Wait: if the Job has an unknown status, usually caused by server problems, this option puts the task on hold throughout the period of time during which the server is inaccessible. When the server is accessible again, the task will restore the status it held prior to encountering the problem.
    • Reset task: if the Job has an unknown status, usually caused by server problems, this option puts the task status back to Ready to run when the predetermined period of time relating to the Job status elapses. However, the Job itself could continue running depending on the initial problem.
    • Restart task: if the Job has an unknown status, usually caused by server problems, this option will automatically start the task in its original state when the predetermined period of time relating to the Job status elapses.
      Information noteNote: The Restart task option is only useful when you are using virtual servers.
    • Recover task: if the Job has an unknown status, usually caused by server problems, this option will automatically recover the Job execution from the last validated checkpoint.
      Information noteNote: The context parameters used when the task is reset, restarted or recovered, are the same as those used during the last execution

    Timeout (s)

    Type in how long to wait, in seconds, before the task is killed.

    By default, if no value is entered in the field, the task runs indefinitely. This option might be useful if you need to limit the execution of a task to a certain period of time.

    Pause triggers on error

    Select the check box in order to pause the trigger(s) if an error occurs during the execution of the task.

  3. Click Save to validate the configuration or Cancel to cancel the creation of the task.
    Once the task has been created, you can still edit its properties, manually or using the Metaservlet application. For more information, see Editing a task.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!