0 votes

Hello, I would like to be able to limit the number of emails sent by a scheduled task in a specified time period. For example the scheduled task for password change reminder would never have more than 50 people, so I would like to have something that says if the task sends more than 50 emails within any 5 minute period stop/freeze the action and request approval to continue, or if approval is not possible stop the action and send an email to the system admin. I would assume this could be done with powershell and a counter. The reason I am asking for this, we had a scheduled task that had a coding error, an OR statement instead of an AND statement, and almost 2,000 people received a confusing email :oops: . I would like to have something that I can put on scheduled tasks to prevent this in the future.

by (2.3k points)

1 Answer

0 votes
by (217k points)
selected by
Best answer

Hello,

Currently this can't be done unless you send emails to all the users with the help of PowerShell. However, in this case you will have to put all the logic of the Scheduled Task in the PowerShell script, and also there can't be a global solution for all the Scheduled Tasks. You'll have to deal with each task one-by-one. This seems completely counter-productive.

Instead, we would suggest making some sort of a test run to make sure that a Scheduled Task works correctly. For example, if you are not sure about the conditions in your Scheduled Task, on the 1st run, instead of sending emails, you can modify a certain property of the AD objects that you don't use. It is a simple action that will not raise unnecessary attention and that you can easily undo. When completely satisfied with the test results, you can replace the action that modifies the property with the Send e-mail notification action.

Related questions

+2 votes
1 answer

We set up a new hire form that has serveral custom text attributes that include pay rate, etc. These fields are routed to the correct departments via a PowerShell ... Is there anyway to prevent certain attributes from displaying in the approver request email?

asked Jan 8, 2020 by dhuffman (470 points)
0 votes
1 answer

Hello everyone, I've received a task to send a report of pending and denied approval requests of a specific task to an email of one of our managers. Since ... $report = $reportHeader + $reportFooter # Send Mail $Context.SendMail($to, $subject, $NULL, $report)

asked Apr 7, 2020 by rshergh (520 points)
0 votes
1 answer

Hi Support, I'm trying to use adaxes to send a couple of branded emails with User information such as UPN and First name. I've written some HTML email code but would ... <table class="wrapper" width="100%" cellspacing="0" align=center cellpadding="0">

asked Feb 18, 2020 by richarddewis (1.5k points)
0 votes
1 answer

Is it possible to change the visibility of required fields in Adaxes 2020.1 as it was with the old Webinterface and custom css for every Webinterface-instance? Thanks

asked Nov 6, 2020 by Michel (250 points)
0 votes
1 answer

Hello, we want to setup a scheduled report with all our teams (security groups) and their respective team-leader (specified in "managedBy" of security group). I get the name of ... the team-leader. And this is my problem... Can you help me with this problem?

asked Oct 9, 2020 by lohnag (1.1k points)
2,381 questions
2,136 answers
5,765 comments
184,983 users