<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Invoking a script in a remote server and returning the exit code in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Invoking-a-script-in-a-remote-server-and-returning-the-exit-code/m-p/2314418#M85188</link>
    <description>Thanks for the reply. I am now using the tSSH component to run a PHP script in a remote server. The command line I've put in the component is as below. 
&lt;BR /&gt;"php /var/www/html/sample/www/test/crontest.php" 
&lt;BR /&gt;The tSSH successfully ran the script. However, I am still not sure how I can return the exit code so to know if the php script ran successfully or not. 
&lt;BR /&gt;Although I've tried "exit 0", "exit 1", or "exit -1" in the PHP script, it all led to the "Success" message box, not the "Fail" message box. 
&lt;BR /&gt;Am I missing something? 
&lt;BR /&gt; 
&lt;IMG src="https://community.qlik.com/" /&gt; 
&lt;BR /&gt; 
&lt;IMG src="https://community.qlik.com/" /&gt; 
&lt;BR /&gt; 
&lt;IMG src="https://community.qlik.com/" /&gt; 
&lt;BR /&gt;Thank you!!!! 
&lt;BR /&gt;Daniel</description>
    <pubDate>Mon, 23 Mar 2009 21:13:21 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2009-03-23T21:13:21Z</dc:date>
    <item>
      <title>Invoking a script in a remote server and returning the exit code</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Invoking-a-script-in-a-remote-server-and-returning-the-exit-code/m-p/2314416#M85186</link>
      <description>Do you know if there is any component that invokes a script in a remote server?
&lt;BR /&gt;For example, I'd like to invoke a C or PHP script in a remote Unix Server using Talend.
&lt;BR /&gt;The script returns an exit code that indicates success (0) or failure (1).
&lt;BR /&gt;Is this something I can do through Talend?
&lt;BR /&gt;Thanks,
&lt;BR /&gt;Daniel</description>
      <pubDate>Sat, 16 Nov 2024 14:01:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Invoking-a-script-in-a-remote-server-and-returning-the-exit-code/m-p/2314416#M85186</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T14:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: Invoking a script in a remote server and returning the exit code</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Invoking-a-script-in-a-remote-server-and-returning-the-exit-code/m-p/2314417#M85187</link>
      <description>Hi,&lt;BR /&gt;tSSH  should do it.&lt;BR /&gt;HTH,</description>
      <pubDate>Fri, 20 Mar 2009 23:03:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Invoking-a-script-in-a-remote-server-and-returning-the-exit-code/m-p/2314417#M85187</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-03-20T23:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: Invoking a script in a remote server and returning the exit code</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Invoking-a-script-in-a-remote-server-and-returning-the-exit-code/m-p/2314418#M85188</link>
      <description>Thanks for the reply. I am now using the tSSH component to run a PHP script in a remote server. The command line I've put in the component is as below. 
&lt;BR /&gt;"php /var/www/html/sample/www/test/crontest.php" 
&lt;BR /&gt;The tSSH successfully ran the script. However, I am still not sure how I can return the exit code so to know if the php script ran successfully or not. 
&lt;BR /&gt;Although I've tried "exit 0", "exit 1", or "exit -1" in the PHP script, it all led to the "Success" message box, not the "Fail" message box. 
&lt;BR /&gt;Am I missing something? 
&lt;BR /&gt; 
&lt;IMG src="https://community.qlik.com/" /&gt; 
&lt;BR /&gt; 
&lt;IMG src="https://community.qlik.com/" /&gt; 
&lt;BR /&gt; 
&lt;IMG src="https://community.qlik.com/" /&gt; 
&lt;BR /&gt;Thank you!!!! 
&lt;BR /&gt;Daniel</description>
      <pubDate>Mon, 23 Mar 2009 21:13:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Invoking-a-script-in-a-remote-server-and-returning-the-exit-code/m-p/2314418#M85188</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-03-23T21:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: Invoking a script in a remote server and returning the exit code</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Invoking-a-script-in-a-remote-server-and-returning-the-exit-code/m-p/2314419#M85189</link>
      <description>Hello Daniel
&lt;BR /&gt;tSSH component run actually ok even thought the exit code is 1 or 0 return by php script.
&lt;BR /&gt;Did you try the global variable: ((Integer)globalMap.get("tSSH_1_EXIT_CODE")). Check the value of this variable when your php script run successfully or not.
&lt;BR /&gt;tSSH--RunIf(((Integer)globalMap.get("tSSH_1_EXIT_CODE"))==1)--&amp;gt;tMsgBox
&lt;BR /&gt; |
&lt;BR /&gt;RunIf(((Integer)globalMap.get("tSSH_1_EXIT_CODE"))==0)--&amp;gt;tMsgBox
&lt;BR /&gt;Best regards
&lt;BR /&gt; 
&lt;BR /&gt; shong</description>
      <pubDate>Tue, 24 Mar 2009 03:33:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Invoking-a-script-in-a-remote-server-and-returning-the-exit-code/m-p/2314419#M85189</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-03-24T03:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: Invoking a script in a remote server and returning the exit code</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Invoking-a-script-in-a-remote-server-and-returning-the-exit-code/m-p/2314420#M85190</link>
      <description>I appreciate your help Shong. It worked perfectly.</description>
      <pubDate>Tue, 24 Mar 2009 16:17:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Invoking-a-script-in-a-remote-server-and-returning-the-exit-code/m-p/2314420#M85190</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-03-24T16:17:11Z</dc:date>
    </item>
  </channel>
</rss>

