Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

Not applicable

Schedule task not working- Windows scheduler.

Hi

I have scheduled 1 task using windows scheduler, i.e. Control Panel-->Security Systems-->Schedule task.

It will run one of the batch file which is present at the same location as the text file.

I have scheduled that task  to run after every 10 Mins and append the data to one of the taxt file.But its not working. From history tab in the scheduler, I come to know that task is triggered but it is not showing any data to the text file.

Any reason?

Br

Anta

9 Replies
MVP
MVP

Schedule task not working- Windows scheduler.

Hi Anta,

Open the document, go to the Settings menu, Document Properties, General tab, and check "Generate logfile". Then let the next scheduled task to perform and check the .log file that is generated along with the reloaded document.

Try the batch file alone in the command line interpreter of Windows to see whether or not it works as expected.

Hope that helps.

Miguel

Not applicable

Schedule task not working- Windows scheduler.

Hi Miguel

Settings menu--> Document Properties--> General tab--> check "Generate logfile", already done.

The batch file is like

Br

Anta

MVP
MVP

Schedule task not working- Windows scheduler.

Hi Anta,

Can you please elaborate on where the logfile says the script stops? By the way, you have not posted the batch file triggered by the Windows Scheduler.

Regards.

Miguel

Not applicable

Schedule task not working- Windows scheduler.

I'll explain it bit more.

The situation is : I have 1 batch file say at the the following location

X: Dev\Doc\b.bat

For scheduling what I did is :

Go to windows scheduler-->schedule task-->create task. here in the trigger tab, I have specified the "one time, repeat task every :10 mins for duration of: indefinite" i.e. it will trigger after every 10 mins

and in the action tab, I have given the path of that .bat file

After triggering it will store data to the text file say "handles.txt"  which is at the same location as "b.bat file"

The problem I am facing her is : the task is triggered, in the history tab I can see that but it is not storing data into text file.

BATCH file is:

set DEST="X:\Dev\Doc\logs"
set H=X:\\Dev\Doc\logs\sql_metadata\gnu
set DT=%DATE% %TIME%

%H%\handle -p qv qvw  | %H%\awk -v DT="%DT%" "{print DT, $0}" >> %DEST%\handles.txt

Br

Anta

MVP
MVP

Schedule task not working- Windows scheduler.

Hi Anta,

As far as I see, handle does not execute QlikView, so the reload never takes place. I may be missing something here but it seems that your problem has nothing to do with QlikView rather than with your command line scripts in Windows. Is that right? Or the idea is to reload QlikView and dump all data from the reload appended to another file?

Regards.

Miguel

Not applicable

Schedule task not working- Windows scheduler.

HI Miguel

Could you please explain thsi "the idea is to reload QlikView and dump all data from the reload appended to another file?"

So do you mean, there is no problem in the batch file, right?

Br

Anta

MVP
MVP

Schedule task not working- Windows scheduler.

Anta,

The batch file seems to be alright, although I'd remove the double backslash in the H variable and the double quotes in the DEST variable, and you probably need to scape the double quotes in the awk command. But run the batch file from the command line and see how does it look like.

In regards to my original question: it is not a question about QlikView, it's a generic question about batch language and command line tools for Windows.

Miguel

Not applicable

Schedule task not working- Windows scheduler.

Hi Miguel

Yes, this is not related to Qlikview..

When I run that .bat file through command prompt, it shows the following error.

X:\Dev\Doc\ logs>"X:\Dev\Doc\logs\sql_metadata\gnu"\ handle -p qv qvw  | "X:\Dev\Doc\logs\sql_metadata\gnu"\awk -v DT="Wed 01/11/2012 12:38:51.05" "{print DT, $0}"  1>>"X:\Dev\Doc\ logs"\handles.txt

The process cannot access the file because it is being used by another process.

Br

Anta

MVP
MVP

Schedule task not working- Windows scheduler.

Hi Anta,

Then check what process is keeping the handles.txt file open (likely handle or awk). There are some tools by the same developers of handle (sysinternals) that can help you check what process as a file locked.

It would be a good idea as well asking into the proper forums (read, Microsoft forums), they are the right place to get help for that.

Regards.

Miguel