Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
reporting_neu
Creator III
Creator III

Load at specific time interval and period

Qlik Sense Enterprise

Hello,
I would like to create a task that loads an app every 10 minutes.
However, not all day long - only within a specific time window, for example from 8 a.m. to 6 p.m.

Is there a way to set this up? So far, I’ve only found the option to run it every 10 minutes continuously, or to run it once at specific times—but never repeatedly within a defined time range.

Labels (1)
2 Solutions

Accepted Solutions
HeshamKhja1
Partner - Creator II
Partner - Creator II

Hi @reporting_neu ,

Edit1: Removed incorrect information.

Edit2: Replaced Exit Script in code with a an error invoking code.

One way to achieve your requirement, is by adding a code into the script to check the time and load if it is within the interval. Else, do not load by invoking an error.

E.g.

Let vNow = Now()
If vNow >= (startpoint) and vNow <= (endpoint)
  RunCode
Else
  CALL InvokeError('Running outside time interval')
End If

 

View solution in original post

9 Replies
HeshamKhja1
Partner - Creator II
Partner - Creator II

Hi @reporting_neu ,

Edit1: Removed incorrect information.

Edit2: Replaced Exit Script in code with a an error invoking code.

One way to achieve your requirement, is by adding a code into the script to check the time and load if it is within the interval. Else, do not load by invoking an error.

E.g.

Let vNow = Now()
If vNow >= (startpoint) and vNow <= (endpoint)
  RunCode
Else
  CALL InvokeError('Running outside time interval')
End If

 

reporting_neu
Creator III
Creator III
Author

Vielen Dank euch beiden.
Super Idee @HeshamKhja1! Die Lösung ist wirklich gut. Ich habe sie etwas angepasst, sodass das Skript im Zeitfenster zwischen 7 und 18 Uhr läuft.

WENN Num(Now()) >= Num(Floor(Now()) + MakeTime(7,0,0)) UND Num(Now()) <= Num(Floor(Now()) + MakeTime(18,0,0)) DANN

    // RunCode like "CALL InvokeError('Running outside time interval')"

ANDERS
    EXIT SCRIPT;
ENDE WENN;
Or
MVP
MVP

Keep in mind that this still reloads the app. It just does so in a different manner (with different code running). 

reporting_neu
Creator III
Creator III
Author

Exactly. It does run every 10 minutes, but if the condition isn’t met (because it’s outside the time window), the rest of the script is not executed, which prevents access to the databases.

Or
MVP
MVP

And the app is then saved with no data... 🙂

reporting_neu
Creator III
Creator III
Author

That needs to be taken into account. But we no longer need any data from that point on.

HeshamKhja1
Partner - Creator II
Partner - Creator II

True, @Or solution is better. I did not know we have such control in QMC Tasks.

As for the app being saved with no data, we can invoke an error purposely by calling a non existing function rather than "Exit Script". Example: CALL InvokeError('Running outside time interval'). Then the app won't reload and the previous data will be maintained.

I edited my earlier reply to reflect this as well.

reporting_neu
Creator III
Creator III
Author

Example:
Mon - Sat every 10 minutes between 08:00 and < 18:00 (last run 17:50)

  1. Create/open Task (Reload task) -> Triggers -> Add -> Scheduled
  2. Select the Custom schedule option.
  3. Set:
    Custom increment:
    10 0 0 0 (10 minutes)
    Custom filter * 8-17 - 1-6 * * * *

 

Explanation of the filter (positions):

  • Pos 0 – Minute: * (any)

  • Pos 1 – Hour: 8–17

  • Pos 2 – WeekDayPrefix: - (none)

  • Pos 3 – Weekday: 1–6 (Mon–Sat, Sun = 0)

  • Remaining positions: * (any)