Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Scheduled Job to send email notification if the pending job is greater than 20k

void0703
New Contributor III
New Contributor III

Hi all,

 

I want to schedule a job to send an email notification when the pending job reach at a certain point for example if pending job is greater than 20k. How can we achieve this.

 

Thanks.

10 REPLIES 10

rushikeshvartak
All-Star
All-Star

What is 20k ? Do you mean total running jobs above 20000 ?


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Yes number of pending tasks 

select 'admin' as username, count(*) as totaltasks from arstasks where status=1 group by status having count > 2000


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

I also want to send a email notification to the admin if the pending task are greater than 20000 for example. How can i achieve this?

rushikeshvartak_0-1705555576222.png

rushikeshvartak_1-1705555670273.png

 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

okay this works but I dont want to run the query manually it must be automatic when the pending job reaches 2000 then it must automatically send the email , how that can be done ?

Scheduled report every 1 hour

rushikeshvartak_2-1705556769794.png

 

rushikeshvartak_1-1705556755409.png

 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Is there any other way to do same ?

Only this is way


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Manu269
All-Star
All-Star

@void0703 One of the option could be scheduling the analytics to run after every 30 min and in case it breaches the threshold as part of query you can trigger an email.

Regards
Manish Kumar
If the response answered your query, please Accept As Solution and Kudos
.