Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Send Email when a condition satisfied at the Job execution time

Hi Everybody,
I have to send mail based on a condition whenever it is true. I mentioned this condition in Tools->Alerts.
I can get the mail when I open the file or when I reload it based on the selection in Alerts but my requirement is, I'll have to schedule my QVW file to run twice on a day daily and while running when it satisfy the condition then it should send a mail. Condition is very simple and based on function and selected field.

I tried all the options in Alerts but it doesn't work. Any body has any idea how to implement it.

Thanks,

1 Solution

Accepted Solutions
Not applicable
Author

Thanks Deepak, Gaurav and Rob. It is working now. I just checked Event as Post Reload, Mode as Batch and Trigger Level as always. I got email when it executed as per schedule.

Now I am started getting another problem. Probably I am doing something wrong. When job started then it keeps running. It is not ending. I want that job should run as per schedule and then stops after completion of load which I have written in the script but it keeps running.

Any idea.

View solution in original post

7 Replies
deepakk
Partner - Specialist III
Partner - Specialist III

hi Anand,

In Script create a Variable. If condition satisfies assign a value, if not assign another value.

eg:

if(........ then

vtest =1

else

vtest =2

end if

Now in Alerts add condition as vtest=1 and in events select only onPostReload. This should satisfy your requirement.

Not applicable
Author

Deepak,
I think I am doing the same thing.
I have given this "=minute(Time(Now(),'HH:MM:SS')) - minute(Last_Time) > 5" in the condition section on Alerts box.

I have checked the option "Post Reload". It works when I reload the QVW file(I get mail) but when I schedule it and at the schedule time when it runs then it doesn't work. I mean I don't get email.

deepakk
Partner - Specialist III
Partner - Specialist III

hi Anand ,

Try a simple one like the one above , check if it is working ( just to ensure its not a bug).

I think in your case the condition is not getting satisfied . What is the exact scenario. May be we can think of different method.

gauravkhare
Creator II
Creator II

hi Anand,

Deepak is right. You can try your hands by creating macros..write the coding in vb. I feel that is a more a responsible way of achieving this requirment. Kindly try and let me know if you face any problem in coding required for this. Wink

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Did you check the "Batch" option in the alert?

See this post
http://qlikviewnotes.blogspot.com/2010/09/monitoring-reload-schedule.html

for an example of an alert that runs post reload.

-Rob

Not applicable
Author

Thanks Deepak, Gaurav and Rob. It is working now. I just checked Event as Post Reload, Mode as Batch and Trigger Level as always. I got email when it executed as per schedule.

Now I am started getting another problem. Probably I am doing something wrong. When job started then it keeps running. It is not ending. I want that job should run as per schedule and then stops after completion of load which I have written in the script but it keeps running.

Any idea.

Not applicable
Author

Guys, it is working fine now. It was my mistake. I did some setting changes that why it was running continuosly. Thanks a lot for your help.