<?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 Get the job duration via a global variable in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Get-the-job-duration-via-a-global-variable/m-p/2313823#M84643</link>
    <description>&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;I would like to know if there is a global variable on the duration of a job. &lt;SPAN&gt;This data is automatically logged in the talend logs.&lt;/SPAN&gt; &lt;SPAN&gt;I know it can also be retrieved via the tChronometerStop component.&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;But is there a global variable associated with this data (as for the name of the job (jobName), the name of the project (projectName), etc.).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;My need, logging the duration of my job during its execution.&lt;/SPAN&gt; If I have to do it with tChronometer, can I run several tChronometerStop without tChronometerStart?&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 17 May 2019 08:46:28 GMT</pubDate>
    <dc:creator>Mayot</dc:creator>
    <dc:date>2019-05-17T08:46:28Z</dc:date>
    <item>
      <title>Get the job duration via a global variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Get-the-job-duration-via-a-global-variable/m-p/2313823#M84643</link>
      <description>&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;I would like to know if there is a global variable on the duration of a job. &lt;SPAN&gt;This data is automatically logged in the talend logs.&lt;/SPAN&gt; &lt;SPAN&gt;I know it can also be retrieved via the tChronometerStop component.&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;But is there a global variable associated with this data (as for the name of the job (jobName), the name of the project (projectName), etc.).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;My need, logging the duration of my job during its execution.&lt;/SPAN&gt; If I have to do it with tChronometer, can I run several tChronometerStop without tChronometerStart?&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2019 08:46:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Get-the-job-duration-via-a-global-variable/m-p/2313823#M84643</guid>
      <dc:creator>Mayot</dc:creator>
      <dc:date>2019-05-17T08:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: Get the job duration via a global variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Get-the-job-duration-via-a-global-variable/m-p/2313824#M84644</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;yes, you can use as many chronometers as you need, without tChronometrStart each of them will count time from the Job start.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if you already enable &lt;A href="https://help.talend.com/reader/eT1URirEr8V_hj9ytQOHvQ/Us3T4rY7xKFJ3gpYIBB1aw" target="_self" rel="nofollow noopener noreferrer"&gt;logs and stats&lt;/A&gt; collection - you could also extract it from the stats table (or file) by the Job pid&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2019 09:17:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Get-the-job-duration-via-a-global-variable/m-p/2313824#M84644</guid>
      <dc:creator>vapukov</dc:creator>
      <dc:date>2019-05-17T09:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: Get the job duration via a global variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Get-the-job-duration-via-a-global-variable/m-p/2313825#M84645</link>
      <description>&lt;P&gt;OK&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEwA.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/128452i3E55D72ADD6D2B26/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEwA.png" alt="0683p000009MEwA.png" /&gt;&lt;/span&gt; , found what I want :&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Math.toIntExact(TalendDate.getCurrentDate().getTime() - startTime)&lt;/P&gt; 
&lt;P&gt;startTime is a long, I compare this long with the current date (convert in long with getTime()).&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I convert long to int with Math.toIntExact.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;What i get : the duration in ms.&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2019 09:39:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Get-the-job-duration-via-a-global-variable/m-p/2313825#M84645</guid>
      <dc:creator>Mayot</dc:creator>
      <dc:date>2019-05-17T09:39:15Z</dc:date>
    </item>
  </channel>
</rss>

