# Adding an execution task to a pre-generated Job

Talend Administration Center allows you to associate a pre-generated .zip file to a Job Conductor task, and thus to skip the generation step, in order to make sure the task that is deployed is the same as the one you have previously deployed.

For example, if you have generated a task in a development environment and want to run the exact same task in the production environment, you may want to use this feature.

To perform this action via the MetaServlet application, use the associatePreGeneratedJob command. For more information about the MetaServlet parameters, see [Parameters and actions in metaServlet](https://help.qlik.com/talend/en-US/administration-center-user-guide/8.0/parameters-and-actions-in-metaservlet).

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

## Before you begin

* A .zip file holding a specific task has been previously generated by Talend Studio. The best practice is to put this file in the Job archive folder, which path is defined in the Job Conductor node of the Configuration page.

  Information noteImportant:
  * when exporting your Job from Talend Studio, you must select the items check box in the Build Job window.

  * this .zip file must contain a jobInfo.properties file at the root level, which describes the project and the Job characteristics.

    These information are necessary for the .zip file to be imported without generating errors.
* A project with the same name as the development project used to generate the Jobs has been created in the Projects page. For more information, see [Adding a project](https://help.qlik.com/talend/en-US/administration-center-user-guide/8.0/adding-project).
* 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 and have the right umask, and some server directories must have been given specific permissions. For more information, see [Configuring user impersonation for Talend JobServer](https://help.qlik.com/talend/en-US/installation-guide-linux/8.0/config-user-impersonation).

  Information noteTip: By default, the username 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 username 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 username, modify the regular expression to ^[a-z][-a-z\_0-9]\*\$.

## Procedure

1. From the toolbar on the Job Conductor page, click Add &gt; Normal Task to display the Execution task configuration panel.

   ![](https://help.qlik.com/talend/en-US/administration-center-user-guide/Resources/images/tac-job_conductor-import_zip.png)
2. Enter/select the following information as necessary.
   | Field | Description |
   | --- | --- |
   | Label | Name of the task to be triggered. |
   | Description | Provides any useful information regarding<br>the task to be carried out. |
   | Active | Select/clear this check box to<br>activate/deactivate this task. |
   | Job | Click the ![](https://help.qlik.com/talend/en-US/administration-center-user-guide/Resources/images/icon-import_zip.png) icon<br>to open the Import generated<br>code window. This window allows you to<br>retrieve the pre-generated file holding the desired Job<br>and to associate this Job to the task.<br><br>Note that, when exporting your Job from Talend Studio, you must select the items check box in<br>the Build Job window to be able to import your<br>Job successfully on the Job Conductor<br>page. |
   | Project | This field is automatically completed and<br>is read-only.<br><br>Note that this project must exist in<br>Talend Administration Center. |
   | Branch | This field is automatically completed<br>and is read-only. |
   | Name | This field is automatically completed<br>and is read-only. |
   | Version | This field is automatically completed<br>and is read-only. |
   | Context | If you have defined several contexts in Talend Studio for the selected Job, select the relevant context in the<br>list.<br><br>If you want to change the context with the Apply context<br>to children option selected, you must go to Talend Studio to rebuild the Job. |
   | Apply context to<br>children | This field is automatically completed and is read-only. It can be<br>set when the Job is built from Talend Studio as a standalone Job. |
   | Log4j Level | Select the level of log you want to<br>apply to the execution task. The levels are ranked in<br>increasing order of severity, from TRACE (most detailed<br>information) to OFF (logs turned off). |
   | Execution server | Select the server on which the task<br>should be deployed.<br><br>If the relevant server does not display<br>on the list, check the Servers page and make sure the server<br>is correctly configured. For more information regarding<br>the execution server configuration, see [Configuring execution servers](https://help.qlik.com/talend/en-US/administration-center-user-guide/8.0/configuring-execution-servers).<br><br>The list of execution servers offers<br>virtual servers corresponding to physical servers<br>grouped together. For details about Virtual Servers, see<br>[Configuring virtual servers](https://help.qlik.com/talend/en-US/administration-center-user-guide/8.0/configuring-virtual-servers). |
   | Statistic | This field is automatically completed for new tasks. The initial<br>value depends on the statistics settings available for the Job and<br>on the default configuration of Talend Administration Center. You can change the value before you save the task. |
   | On<br>unavailable JobServer | This option is part of the failover process provided by Qlik. and allows you to decide what action you want to take on the<br>selected task when the server is unavailable during a predetermined<br>period of time (defined in [Adding an execution server](https://help.qlik.com/talend/en-US/administration-center-user-guide/8.0/adding-execution-server)).<br><br>Select one of the following from the list. The default<br>value is Reset task.<br><br><ul> <li> <span>Wait</span>: 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.</li> <li> <span>Reset                                                  task</span>: if the Job has an unknown                                                status, usually caused by server problems, this                                                option puts the task status back to <kbd>Ready to run</kbd> when the                                                predetermined period of time relating to the Job                                                status elapses. However, the Job itself could                                                continue running depending on the initial                                                problem.</li> <li> <span>Restart                                                  task</span>: 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.<div><span>Information note</span><span>Note:</span> The <span>Restart task</span> option is only useful                                                  when you are using virtual servers.</div> </li> <li> <span>Recover                                                  task</span>: 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.<div><span>Information note</span><span>Note:</span> The context parameters used when                                                  the task is reset, restarted or recovered, are the                                                  same as those used during the last execution                                                </div> </li> </ul> |
   | Timeout (s) | Type in how long to wait, in seconds,<br>before the task is killed.<br><br>By default, if no value is entered in<br>the field, the task runs indefinitely. This option might<br>be useful if you need to limit the execution of a task<br>to a certain period of time. |
   | Pause triggers on<br>error | Select the check box in order to pause<br>the trigger(s) if an error occurs during the execution<br>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](https://help.qlik.com/talend/en-US/administration-center-user-guide/8.0/editing-task).