PHP code example of inzh / talend-job-manager

1. Go to this page and download the library: Download inzh/talend-job-manager library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

inzh / talend-job-manager example snippets


use inzh\talend\job\manager\executor\SimpleJobExecutor;

$path = "myjobname_0.1.zip"; // Your job zip file 
$repositoryPath = "jobs"; // Your repository path

SimpleJobExecutor::put($path, $repositoryPath);

use inzh\talend\job\manager\executor\SimpleJobExecutor;

$jobName = "myjobname"; // Your job name
$repositoryPath = "jobs"; // Your repository path
$parameters = ["contextparam1" => "value1", "contextparam2" => "value2"]; // Context parameters passed to job

$output = SimpleJobExecutor::execute($jobName, $parameters, $repositoryPath);
print_r($output);

use inzh\talend\job\manager\executor\SimpleJobExecutor;

$jobName = "myjobname"; // Your job name
$repositoryPath = "jobs"; // Your repository path
$parameters = ["contextparam1" => "value1", "contextparam2" => "value2"]; // Context parameters passed to job
$version = 0.1;

$output = SimpleJobExecutor::execute($jobName, $parameters, $repositoryPath, $version);
print_r($output);