Qlik Community

Qlik NPrinting Discussions

Discussion Board for collaboration on Qlik NPrinting.

Announcements
Read about the latest Qlik Community enhancements on the Community News blog!
cancel
Showing results for 
Search instead for 
Did you mean: 
mightyqlikers
Creator III
Creator III

NPrinting Quarterly Task Trigger in June 2019 version

Hi Team,

 

I am using NPrinting June 2019 version 19.19.

I am not able to set a task trigger as Quarterly once.

 

Please let me know if it is possible with this version.

 

Regards

$@M

Labels (2)
2 Solutions

Accepted Solutions
Lech_Miszkiewicz

Hi @mightyqlikers 

There is no difference in the principle...

Logic to derive "second Friday" depends on whether you want to use some sort Fiscal Calendar and what are your quarters. If it is just simple Calendar Quarters (Jan-Mar, Apr-Jun,Jul-Sep& and Oct-Dec you can then use something like (note that this can be different if your system variables are set to use different names for days:

  • vNP_Condition_Qtr =  "=If(Text(WeekDay(Today()))='Fri' and Day(Today())>7 and Day(Today())<15 and Match(Floor(Month(Today())),'1','4','7','10'),1,0)"

You can then optimise it little bit on NPrinting side by setting up weekly Trigger which will run only on Fridays. It still needs to check the condition I mentioned in my previous comment (this time condition needs to be against variable i mentioned above). That variable will return 1 only on second Friday of the quarter.

 

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.

View solution in original post

Lech_Miszkiewicz

Just setup it up in Trigger for 11:00 (point 5 on my screenshot):

2.png

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.

View solution in original post

6 Replies
Lech_Miszkiewicz

This needs to be done by creating a condition to check whether a day you want to run your report is meeting criteria for this report to run. Whole logic should be done in Qlik Sense (variables).

I don't know your exact requirements but lets just assume that you need to run your report on 1st January, 1st April,1st July and 1st October.

In Qlik Sense you can setup variable which will return 1 if month is first month of the quarter:

  • vNP_Condition_Qtr = "=If(Match(Floor(Month(Today())),'1','4','7','10'),1,0) "

In NPrinting you setup Monthly trigger to run on 1st day of the month and use above mentioned variable in publish task condition if you want whole task to run quarterly.

 

Always read documentation so --> more about conditions:

Understanding variables in nPrinting (note my variable is an expression and needs to start with "=" sign)

What is going to happen on 1st of Feb in above example: Task will be initiated, but condition will be checked and since it will not be met task will end. 

That's it. I think it is very easy and straight forward solution. Using the same approach with variable and condition you can setup your triggers to run on any day when some conditions are met. 

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
mightyqlikers
Creator III
Creator III
Author

Hi Lech,

Thanks for the details.

Actual requirement is that, i have a NPrinting task which should run second friday of every quarter.

for example next coming second friday of the quarter is 10th of July.

 

hope that is clear.

 

Regards

$@M

Lech_Miszkiewicz

Hi @mightyqlikers 

There is no difference in the principle...

Logic to derive "second Friday" depends on whether you want to use some sort Fiscal Calendar and what are your quarters. If it is just simple Calendar Quarters (Jan-Mar, Apr-Jun,Jul-Sep& and Oct-Dec you can then use something like (note that this can be different if your system variables are set to use different names for days:

  • vNP_Condition_Qtr =  "=If(Text(WeekDay(Today()))='Fri' and Day(Today())>7 and Day(Today())<15 and Match(Floor(Month(Today())),'1','4','7','10'),1,0)"

You can then optimise it little bit on NPrinting side by setting up weekly Trigger which will run only on Fridays. It still needs to check the condition I mentioned in my previous comment (this time condition needs to be against variable i mentioned above). That variable will return 1 only on second Friday of the quarter.

 

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.

View solution in original post

mightyqlikers
Creator III
Creator III
Author

Hi Lech,

One last thing.

it should run on 2nd friday of the quarter at 11:00 PM.

Please help me with same.

 

Regards

S@M.

Lech_Miszkiewicz

Just setup it up in Trigger for 11:00 (point 5 on my screenshot):

2.png

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.

View solution in original post

mightyqlikers
Creator III
Creator III
Author

Hi Lech,

 

Perfect.

 

Thank you very much

$@M.