<?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 Script suddelny stops on for each loop when executed by QMC task in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Script-suddelny-stops-on-for-each-loop-when-executed-by-QMC-task/m-p/1648595#M594270</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;i have a qlik application which decrypts and unzips files, reads them and then deletes the decrypted files again. It works only when i execute it manually. I tried executing it with the same User as QMC would do it and on the same Server as QMC would do it (QV Server runs on 2 machines,only distribution services runs on the 2nd machine).&lt;/P&gt;&lt;P&gt;But the script stops at the "FOR EACH file in filelist" Loop - which checks how many files are in the directory.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I attached 2 log files, both executed with the same user and on the same machine only difference is manually or QMC task.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 19:38:33 GMT</pubDate>
    <dc:creator>Lukas_H</dc:creator>
    <dc:date>2024-11-16T19:38:33Z</dc:date>
    <item>
      <title>Script suddelny stops on for each loop when executed by QMC task</title>
      <link>https://community.qlik.com/t5/QlikView/Script-suddelny-stops-on-for-each-loop-when-executed-by-QMC-task/m-p/1648595#M594270</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;i have a qlik application which decrypts and unzips files, reads them and then deletes the decrypted files again. It works only when i execute it manually. I tried executing it with the same User as QMC would do it and on the same Server as QMC would do it (QV Server runs on 2 machines,only distribution services runs on the 2nd machine).&lt;/P&gt;&lt;P&gt;But the script stops at the "FOR EACH file in filelist" Loop - which checks how many files are in the directory.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I attached 2 log files, both executed with the same user and on the same machine only difference is manually or QMC task.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 19:38:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-suddelny-stops-on-for-each-loop-when-executed-by-QMC-task/m-p/1648595#M594270</guid>
      <dc:creator>Lukas_H</dc:creator>
      <dc:date>2024-11-16T19:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: Script suddelny stops on for each loop when executed by QMC task</title>
      <link>https://community.qlik.com/t5/QlikView/Script-suddelny-stops-on-for-each-loop-when-executed-by-QMC-task/m-p/1654201#M594271</link>
      <description>&lt;P&gt;Hey Lukas, I think I know what is wrong here, you need to replace&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Y:\01_MPTS\01_ATR\ATR*.csv.zip.gpg&lt;/P&gt;
&lt;P&gt;with something like&lt;/P&gt;
&lt;P&gt;\\fileservername\filesharename\folder(s)\*....&lt;/P&gt;
&lt;P&gt;The service account has no knowledge of mapped drives, so you need to use a UNC path instead, hopefully this will make sense and you are able to create a file share on that location, actually, should already be there now that I think about it as you mapped a drive to it! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp; Just use the UNC convention instead of your mapped drive, and I think it will run correctly.&amp;nbsp; When you run things as a service is when stuff like this comes into play, just FYI.&amp;nbsp; One other gotcha here, be sure if there are subfolders in the path that all those folders have the same NTFS permissions, as if one of them in the middle is more restrictive than the others, that could cause issues as well as service accounts have to parse each folder in the path, which is different than a logged on user...&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 16:00:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-suddelny-stops-on-for-each-loop-when-executed-by-QMC-task/m-p/1654201#M594271</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2019-12-04T16:00:06Z</dc:date>
    </item>
    <item>
      <title>Re: Script suddelny stops on for each loop when executed by QMC task</title>
      <link>https://community.qlik.com/t5/QlikView/Script-suddelny-stops-on-for-each-loop-when-executed-by-QMC-task/m-p/1654890#M594272</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;i changed the path to a UNC path but that didn't fix the problem.&lt;/P&gt;&lt;P&gt;I also edited the settings.ini file under "C:\Windows\System32\config\systemprofile\AppData\Roaming\QlikTech\QlikViewBatch" and added "AllowExecuteCommand=1".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now the task doesn't run into an error but it keeps reloading forever. I tried a solution i found on here where i delete the file corresponding to the task under ..\Qliktech\DistributionService\TaskResults but that didn't help either.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2019 08:56:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-suddelny-stops-on-for-each-loop-when-executed-by-QMC-task/m-p/1654890#M594272</guid>
      <dc:creator>Lukas_H</dc:creator>
      <dc:date>2019-12-06T08:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Script suddelny stops on for each loop when executed by QMC task</title>
      <link>https://community.qlik.com/t5/QlikView/Script-suddelny-stops-on-for-each-loop-when-executed-by-QMC-task/m-p/1655070#M594273</link>
      <description>&lt;P&gt;Just from the log-files it's quite difficult to detect a possible issue. If loops don't run it's often useful to uncomment various parts and to add them then step by step again to find the breakpoint.&lt;/P&gt;&lt;P&gt;Also give it a try to execute it per qmc when the qmc-user is logged in. It's not mandatory that each single thread which the various sub-routines / EXECUTES might run will work - they might not inherit all the rights from the user and/or there are various libraries/functions which only work within a user-context (if none is logged in the OS takes the default-user which has usually not the appropriate access rights / licences and so on).&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2019 15:32:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-suddelny-stops-on-for-each-loop-when-executed-by-QMC-task/m-p/1655070#M594273</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-12-06T15:32:28Z</dc:date>
    </item>
  </channel>
</rss>

