Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
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
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?
I was trying to be slightly more elegant?
Thanks,
Rob
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
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
Gabriel, that's correct if you have Publisher. I guess it's not the Rob's case.
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
Thanks everyone some good suggestions to work though particularly like JULIAN.RODRIGUEZ "In Script" approach.
Hi,
Use the below script in the beginning.
if hour(now())<=11 or hour(now())>=22 then
exit script;
endif