<?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: Exit script but keep data in Qlik Sense without fail log? in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Exit-script-but-keep-data-in-Qlik-Sense-without-fail-log/m-p/1828906#M68313</link>
    <description>&lt;P&gt;A partial workaround for this is:&lt;/P&gt;&lt;P&gt;SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';&lt;/P&gt;&lt;P&gt;LET vSOBD = NUM(MakeTime(02,00));&lt;/P&gt;&lt;P&gt;LET vCOB = NUM(MakeTime(21,30));&lt;/P&gt;&lt;P&gt;IF (WeekDay(TODAY()) &amp;lt;&amp;gt; 'Sat' AND WeekDay(TODAY()) &amp;lt;&amp;gt; 'Sun') AND (FRAC(Time(NOW())) &amp;gt;= $(vSOBD) AND FRAC(Time(NOW())) &amp;lt;= $(vCOB)) THEN&lt;/P&gt;&lt;P&gt;Load FakeField Resident FakeTable;&lt;/P&gt;&lt;P&gt;END IF&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This should result in an error any time your condition is true, and unless you're toggled ErrorMode=0, an error should cause the reload task to fail and not replace the existing data. It does mean that this will be listed as a failed reload, though, rather than a successfully completed reload, so it only achieves two of your three goals.&lt;/P&gt;&lt;P&gt;I think you'd need to use some sort of more complex workaround if you want to achieve all three - perhaps you could chain two application reload tasks. The first app would just check the time condition and fail (as above) during the specific times required, and the second task for the actual app being reloaded would trigger off a successful finish of the first app. You could also use an external script with API calls to reload only at specified times, I assume.&lt;/P&gt;&lt;P&gt;One last possible workaround solution - rather than exiting the script, check the time, and if it's within the time frame you want to avoid loading, sleep() for ten minutes and then check again (using a loop) until e.g. 2am is hit and the reload can take place. This will keep the app loading for a long time but it won't cause it to fail and it shouldn't eat up resources.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 16 Aug 2021 19:32:50 GMT</pubDate>
    <dc:creator>Or</dc:creator>
    <dc:date>2021-08-16T19:32:50Z</dc:date>
    <item>
      <title>Exit script but keep data in Qlik Sense without fail log?</title>
      <link>https://community.qlik.com/t5/App-Development/Exit-script-but-keep-data-in-Qlik-Sense-without-fail-log/m-p/1828861#M68303</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I want to save server pressure by only loading an app during business hours.&lt;/P&gt;&lt;P&gt;In order to only load an app during specific times, I exit the script outside the time intervals.&lt;/P&gt;&lt;P&gt;The problem is that all data disappears. Is there any way of exiting the script, retaining the data from the last reload and not getting fail errors in the logs?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 16:02:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Exit-script-but-keep-data-in-Qlik-Sense-without-fail-log/m-p/1828861#M68303</guid>
      <dc:creator>AnnaEKinch</dc:creator>
      <dc:date>2021-08-16T16:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: Exit script but keep data in Qlik Sense without fail log?</title>
      <link>https://community.qlik.com/t5/App-Development/Exit-script-but-keep-data-in-Qlik-Sense-without-fail-log/m-p/1828864#M68304</link>
      <description>&lt;P&gt;Hi can you please share the script you are using.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 16:07:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Exit-script-but-keep-data-in-Qlik-Sense-without-fail-log/m-p/1828864#M68304</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2021-08-16T16:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: Exit script but keep data in Qlik Sense without fail log?</title>
      <link>https://community.qlik.com/t5/App-Development/Exit-script-but-keep-data-in-Qlik-Sense-without-fail-log/m-p/1828865#M68305</link>
      <description>&lt;P&gt;SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';&lt;/P&gt;&lt;P&gt;LET vSOBD = NUM(MakeTime(02,00));&lt;/P&gt;&lt;P&gt;LET vCOB = NUM(MakeTime(21,30));&lt;/P&gt;&lt;P&gt;IF (WeekDay(TODAY()) &amp;lt;&amp;gt; 'Sat' AND WeekDay(TODAY()) &amp;lt;&amp;gt; 'Sun') AND (FRAC(Time(NOW())) &amp;gt;= $(vSOBD) AND FRAC(Time(NOW())) &amp;lt;= $(vCOB)) THEN&lt;/P&gt;&lt;P&gt;EXIT SCRIPT;&lt;/P&gt;&lt;P&gt;ELSE&lt;/P&gt;&lt;P&gt;LOAD FAIL FROM ERROR;&lt;/P&gt;&lt;P&gt;END IF;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 16:12:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Exit-script-but-keep-data-in-Qlik-Sense-without-fail-log/m-p/1828865#M68305</guid>
      <dc:creator>AnnaEKinch</dc:creator>
      <dc:date>2021-08-16T16:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: Exit script but keep data in Qlik Sense without fail log?</title>
      <link>https://community.qlik.com/t5/App-Development/Exit-script-but-keep-data-in-Qlik-Sense-without-fail-log/m-p/1828872#M68307</link>
      <description>&lt;P&gt;What if you binary load itself first.&amp;nbsp;&lt;/P&gt;&lt;P&gt;And if condition meets where you are getting new data, drop all tables first (using below) and then do your load script, otherwise exit, but you now would have loaded all data in before exiting.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;for i = 0 to NoOfTables()-1&lt;BR /&gt;&lt;BR /&gt;let vTableName = '[' &amp;amp; TableName($(i)) &amp;amp; ']';&lt;BR /&gt;drop table $(vTableName) ;&lt;/P&gt;&lt;P&gt;next i&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 16:29:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Exit-script-but-keep-data-in-Qlik-Sense-without-fail-log/m-p/1828872#M68307</guid>
      <dc:creator>stevejoyce</dc:creator>
      <dc:date>2021-08-16T16:29:02Z</dc:date>
    </item>
    <item>
      <title>Re: Exit script but keep data in Qlik Sense without fail log?</title>
      <link>https://community.qlik.com/t5/App-Development/Exit-script-but-keep-data-in-Qlik-Sense-without-fail-log/m-p/1828890#M68311</link>
      <description>&lt;P&gt;Thanks, but the mail goal is not to load the app at all between 21,30 and 02,00 to save the server....in your example the app loads every time?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 18:02:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Exit-script-but-keep-data-in-Qlik-Sense-without-fail-log/m-p/1828890#M68311</guid>
      <dc:creator>AnnaEKinch</dc:creator>
      <dc:date>2021-08-16T18:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: Exit script but keep data in Qlik Sense without fail log?</title>
      <link>https://community.qlik.com/t5/App-Development/Exit-script-but-keep-data-in-Qlik-Sense-without-fail-log/m-p/1828905#M68312</link>
      <description>&lt;P&gt;Yes but it is a quick reload.&amp;nbsp; If you are trying to control scheduling itself, can't you do this in your Tasks's trigger condition?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 19:31:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Exit-script-but-keep-data-in-Qlik-Sense-without-fail-log/m-p/1828905#M68312</guid>
      <dc:creator>stevejoyce</dc:creator>
      <dc:date>2021-08-16T19:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: Exit script but keep data in Qlik Sense without fail log?</title>
      <link>https://community.qlik.com/t5/App-Development/Exit-script-but-keep-data-in-Qlik-Sense-without-fail-log/m-p/1828906#M68313</link>
      <description>&lt;P&gt;A partial workaround for this is:&lt;/P&gt;&lt;P&gt;SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';&lt;/P&gt;&lt;P&gt;LET vSOBD = NUM(MakeTime(02,00));&lt;/P&gt;&lt;P&gt;LET vCOB = NUM(MakeTime(21,30));&lt;/P&gt;&lt;P&gt;IF (WeekDay(TODAY()) &amp;lt;&amp;gt; 'Sat' AND WeekDay(TODAY()) &amp;lt;&amp;gt; 'Sun') AND (FRAC(Time(NOW())) &amp;gt;= $(vSOBD) AND FRAC(Time(NOW())) &amp;lt;= $(vCOB)) THEN&lt;/P&gt;&lt;P&gt;Load FakeField Resident FakeTable;&lt;/P&gt;&lt;P&gt;END IF&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This should result in an error any time your condition is true, and unless you're toggled ErrorMode=0, an error should cause the reload task to fail and not replace the existing data. It does mean that this will be listed as a failed reload, though, rather than a successfully completed reload, so it only achieves two of your three goals.&lt;/P&gt;&lt;P&gt;I think you'd need to use some sort of more complex workaround if you want to achieve all three - perhaps you could chain two application reload tasks. The first app would just check the time condition and fail (as above) during the specific times required, and the second task for the actual app being reloaded would trigger off a successful finish of the first app. You could also use an external script with API calls to reload only at specified times, I assume.&lt;/P&gt;&lt;P&gt;One last possible workaround solution - rather than exiting the script, check the time, and if it's within the time frame you want to avoid loading, sleep() for ten minutes and then check again (using a loop) until e.g. 2am is hit and the reload can take place. This will keep the app loading for a long time but it won't cause it to fail and it shouldn't eat up resources.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 19:32:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Exit-script-but-keep-data-in-Qlik-Sense-without-fail-log/m-p/1828906#M68313</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2021-08-16T19:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: Exit script but keep data in Qlik Sense without fail log?</title>
      <link>https://community.qlik.com/t5/App-Development/Exit-script-but-keep-data-in-Qlik-Sense-without-fail-log/m-p/1828979#M68325</link>
      <description>&lt;P&gt;Thanks for great ideas! Awesome! Sleep especially creative...I wonder if it takes a lot of CPU-usage? Does it lock a CPU?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 07:54:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Exit-script-but-keep-data-in-Qlik-Sense-without-fail-log/m-p/1828979#M68325</guid>
      <dc:creator>AnnaEKinch</dc:creator>
      <dc:date>2021-08-17T07:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: Exit script but keep data in Qlik Sense without fail log?</title>
      <link>https://community.qlik.com/t5/App-Development/Exit-script-but-keep-data-in-Qlik-Sense-without-fail-log/m-p/1828991#M68327</link>
      <description>&lt;P&gt;Temporarily we decided to via QlikView trigger the Qlik Sense app.&lt;/P&gt;&lt;P&gt;But the suggestion below would be perfect. Please vote if you agree!&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Suggest-an-Idea/Qlik-Sense-task-reload-between-hours/idi-p/1652951" target="_blank"&gt;https://community.qlik.com/t5/Suggest-an-Idea/Qlik-Sense-task-reload-between-hours/idi-p/1652951&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 08:57:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Exit-script-but-keep-data-in-Qlik-Sense-without-fail-log/m-p/1828991#M68327</guid>
      <dc:creator>AnnaEKinch</dc:creator>
      <dc:date>2021-08-17T08:57:16Z</dc:date>
    </item>
  </channel>
</rss>

