Qlik Community

QlikView Administration

Discussion Board for collaboration on QlikView Management.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
jindrichk
Contributor II
Contributor II

QVMC schedule task on both failure and success of another

Hi,

I have two tasks - QVD reload and front end UI reload. I would like to schedule both in QVMC as fast as possible.

What I have done is that I scheduled both on success reload of other one. This works fine until one of the task fail. In this case whole reload stop.

I wonder if there is some solution which will start the load of task on both failure and success of previous task. Or maybe start the reload of the same task in case of failure.

The failures are usually because of some temporary problems which are solved quickly so next reload are ok.

Does anybody have some idea how to solve this?

Regards,

Jindra

Labels (1)
16 Replies
jindrichk
Contributor II
Contributor II
Author

Hi Peter,

I missed the info about Publisher in the first post. I was really thinking only about QVMC as written in post name. Forgot to stress it.

This using Windows scheduler is not helping in having the reload in "loop". I can schedule the taskon some time in QVMC same way as using Win Scheduler.

I wanted to have them one right after another,

Peter_Cammaert
Partner
Partner

You mean you want to schedule Task 1 -> Task 2 (whatever the outcome of Task 1) -> Task 1 (whatever the outcome of Task 2) -> and so on?

That is perfectly possible with a batch/command file. The Windows Task Scheduler trigger will fire only once, and then an unlimited execution loop will start. Is that what you want?

jindrichk
Contributor II
Contributor II
Author

Yes, that is exactly what I want to create.

So I probably did not understand how you want to create the batch file. Can I ask you for some more details of how to handle this?

Peter_Cammaert
Partner
Partner

Well, QlikView Desktop can also be used to reload a document, even from a batch file. The command line sytax is something like:

"C:\PathToQVDesktop\QV.EXE" /r "PathToQVDocument\QVDocument.QVW"

This command will launch QV Desktop, load the document, execute the script, save the document (if everything went well) and close QV Desktop. Open a command prompt and test it.

Add two of these to a CMD file (one for each reload), preceded by a label (like :Start) and followed by a GOTO Start.

In batch/command files, you must expressly test for the outcome of a specific statement. By not doing this, you will ignore failure or success any proceed to the next statement anyway. Seems to me that this is what you would like to happen.

Peter

jindrichk
Contributor II
Contributor II
Author

I have tried to run the test project which always fail using batch file via via running QV desktop in command line. The result is that the window with log and the error remains opened. Not sure if the result using win scheduler will be different but I gues it will not

screenshot.JPG

Peter_Cammaert
Partner
Partner

You can avoid these pop-ups by placing the following statement in your script immediately before the part where things might go wrong (or at the start if you like):

SET ErrorMode = 0; // Suppress Error messages

Best,

Peter

jindrichk
Contributor II
Contributor II
Author

Thanks Peter, this seems to be really a valid way how to hnadle it.

Regards,

Jindra