Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
hugmarcel
Specialist
Specialist

How to restart a failed task in QMC console after 5 minutes

Hi

I'd like to automatically restart a load task in the QMC console 5 minutes after the task has failed. How can I achieve this?

In "Task Execution Options" of trigger settings, I can define the "number of tries" together with a "timout in minutes" option.

Increasing the "number of tries" does not help, as a retry is always started immediately after the task failure. This does not make sense in situations, where a database connectivity is temporarily not available and the task fails after just 2seconds of runtime.

Thx for the help

Marcel

1 Solution

Accepted Solutions
Anonymous
Not applicable

Marcel

At the beginning of the load script you could put a sleep(300000) to wait 5 minutes before getting into the real script in combination with "number of tries" ?

You could have some variables so that it could check when it was last run, so if say it was last run over an hour ago it skips the sleep.

Best Regards,     Bill

View solution in original post

8 Replies
Anonymous
Not applicable

Marcel

At the beginning of the load script you could put a sleep(300000) to wait 5 minutes before getting into the real script in combination with "number of tries" ?

You could have some variables so that it could check when it was last run, so if say it was last run over an hour ago it skips the sleep.

Best Regards,     Bill

hugmarcel
Specialist
Specialist
Author

Hi Bill

I was thinking of this solution as well. It's a good Idea to control the sleep-execution with the help of variables!

However, the solution is causing further problems regarding Usage of QV engines in QMC console, as every sleep-execution blocks a QV engine. This will lead to errors such as "Error: Failed to create QlikView Engine.." as lots of simultanous tasks will be running.

Could you think of a solution that does not use / block QV engines...

thx - Marcel

Anonymous
Not applicable

Marcel

How about in Publisher creating a Supporting Task in the Pause Folder to Delay for 300 seconds that is triggered by the failure of your Task that then chains onto your Task again.

I don't know whether or not this will occupy a QV Engine during the pause though.

Best Regards,     Bill

Not applicable

may be you can use one of the option in errormode setting..many logical can use here depends on the purpose

or combine with variable..

or set the task every 5 minutes..

hugmarcel
Specialist
Specialist
Author

Hi Bill

nice idea again.

However, we have approx. 50 load tasks running, and I do not like to create 50 additional supporting tasks :-).

Hm, maybe it's possible to have 1 pausing support task only which checks all the 50 load tasks?

I would be nice to have a "task pausing" interval as a QMC trigger option. Using additional tasks will always increase complexity and administration work.

Marcel

Not applicable

Hi Marcel,

We have the same problem, and have resolved it with a programming process that will check the status of all the tasks, and reload the failed ones.

It's a pretty simple process that can be setup to execute on any windows machine.  We have ours running just on my local desktop on a schedule (every 20 min).

I see that you've marked this question as answered, but if you are interested in solving this problem with our solution, please contact me.

hugmarcel
Specialist
Specialist
Author

Hi Sam

thank you for the reply, of course I am very interested to see what your solution is!

Regards - Marcel

hugmarcel
Specialist
Specialist
Author

Hi

I now use task dependency information to write a script that restarts failed and not executed QMC tasks by use of the QMSEDX interface.


Steps are:

1.) Create data model with task dependency information.
2.) Read todays Distribution Service task logfile to find failed and unexecuted tasks.
3.) Restart failed and unexecuted tasks, evaluate task dependency information!
4.) Send a QMC reload status sms.


You can execute all script tasks with Windows Task Scheduler. By setting a propper execution interval,
the QVS file allows you to track and restart QMC tasks in a very efficient and elegant way.


See in http://community.qlik.com/docs/DOC-6665.


Marcel