Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

racer25
New Contributor III

Refresh Hourly but not during the night..

Hi,

I am looking to refresh hourly a single Qlikview document between the hours of 8am and 5pm.

There is absolutely no point in it running the process evenings/nights/weekends etc.

I can see from the QMC my options seem to be hourly or daily? Furthermore I can't see more than one refresh per app.

Is there a way of doing this to a custom schedule?

Thanks in advance

Rob

Tags (1)
Labels (2)
1 Solution

Accepted Solutions
julian_rodrigue
Valued Contributor

Re: Refresh Hourly but not during the night..

Another idea:

May be you can add some code on the top of the script, asking and comparing the current time and the currend day of the week.

Something like:

LET vCurrentDay = WeekDay(Today());
LET vCurrentHour = Hour(Time(Now()));

If $(vCurrentDay) = 'Sat' or $(vCurrentDay) = 'Sun' THEN // It's  weekend!
EXIT Script;
ELSEIF $(vCurrentHour) >= 8 And $(vCurrentHour) <= 17 THEN // It's  time to work!
  // Insert your code from here:

  LOAD * INLINE [
    TEST
    A
    B
    C
];

// to here
ELSE
EXIT Script;
END IF;


And you may Schedule this task hourly, everyday, but the long code only will be executed when both conditions be true, otherwise it will run a few lines asking for the day and time, no more.

Regards

7 Replies
julian_rodrigue
Valued Contributor

Re: Refresh Hourly but not during the night..

Hello Rob,

The only approach could be "clone" the qvw's as many programmations you need, but it will be around 40 tasks easy (too much administration, but it's the only way).

The best option to do that is purchasing Qlikview Publisher, with this add in you can do that and much more!

Regards,

Julian

racer25
New Contributor III

Re: Refresh Hourly but not during the night..

Hi Julian,

I was thinking of a command line refresh and then as an ugly method create several windows tasks to complete this and maybe let the QMC run the 1st one for logging purposes?

  1. "C:\Program Files\QlikView11\qv.exe" /r "C:\File.qvw" 

I was trying to be slightly more elegant?


Thanks,


Rob

julian_rodrigue
Valued Contributor

Re: Refresh Hourly but not during the night..

Another idea:

May be you can add some code on the top of the script, asking and comparing the current time and the currend day of the week.

Something like:

LET vCurrentDay = WeekDay(Today());
LET vCurrentHour = Hour(Time(Now()));

If $(vCurrentDay) = 'Sat' or $(vCurrentDay) = 'Sun' THEN // It's  weekend!
EXIT Script;
ELSEIF $(vCurrentHour) >= 8 And $(vCurrentHour) <= 17 THEN // It's  time to work!
  // Insert your code from here:

  LOAD * INLINE [
    TEST
    A
    B
    C
];

// to here
ELSE
EXIT Script;
END IF;


And you may Schedule this task hourly, everyday, but the long code only will be executed when both conditions be true, otherwise it will run a few lines asking for the day and time, no more.

Regards

Gabriel
Valued Contributor II

Re: Refresh Hourly but not during the night..

Hi,

You have the option to set the schedule time in QMC. See screen print attached. Click on the green + sign to have this dialog box

Run Hourly 8_5pm.png

julian_rodrigue
Valued Contributor

Re: Refresh Hourly but not during the night..

Gabriel, that's correct if you have Publisher. I guess it's not the Rob's case.

Employee
Employee

Re: Refresh Hourly but not during the night..

Hi Robert,

If you decide to run a command line, I would look at doing a batch reload. Attached you will find the information on how to do it. This is from a older version 10 manual (not sure why they don't include it any more). It is a cleaner way to do it and it doesn't take up a license.

Bill

racer25
New Contributor III

Re: Refresh Hourly but not during the night..

Thanks everyone some good suggestions to work though particularly like JULIAN.RODRIGUEZ "In Script" approach.

Community Browser