0 votes

Is it possible to disable then re-enable a Business Rule from a Scheduled Task?

For example, when the Scheduled tasks starts, it disables a Business Rule, runs the Task(s), then re-enables the Business Rule when done.

by (1.1k points)

1 Answer

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


That is not the best approach. Do you understand that in this case, while the task is running, the Business Rule won't be applied at all, even if a user performs an action that triggers the Business Rule manually?

Instead, we suggest adding a condition to your Business Rule so that the rule actions won't be triggered by the Scheduled Task. That is, you need to add a condition that will prevent performing the actions if the initiator of the operation is the Scheduled Task. To do this:

I. Copy the Distinguished Name (DN) of your Scheduled Task

To add such a condition, first, you need to copy the task DN:

  1. In the Console Tree of the Administration Console, navigate to and select your Scheduled Task.
  2. Right-click it and select Properties.
  3. Click Advanced.
  4. Copy the DN in the Object DN field.

II. Add condition to the Business Rule

To add the condition:

  1. In the Console Tree of the Administration Console, navigate to and select the Business Rule you need.
  2. In the Result Pane (located to the right), select a set of actions/conditions that should not be performed when an operation is performed by the task.
  3. Right-click it and select Add Condition.
  4. Select If the initiator is User and click Select User.
  5. Activate the Template tab and paste the Scheduled Task DN you've copied on step I in the Template field.
  6. Click OK.
  7. Select is not.
  8. Click OK again and save the changes.

Related questions

0 votes
1 answer

My scheduled task currently: Checks for staff in a particular OU that do not have an O365 license Adds a license Resets their AD Password Moves them to an OU based off ... scheduled task moves them out of the OU that the business rule is looking at. Thanks

asked Apr 15, 2020 by russmerriman (40 points)
0 votes
1 answer

Hi Adaxes Team I have created a business rule which sends a mail to our helpdesk staff after a user sets a new pw with the self password reset function. The user should ... . If this is not possible yet, please forward it as a suggestion :) regards pudong

asked Feb 4 by pudong (410 points)
0 votes
1 answer

I am trying to send a $context.logmessage from a condition script in a Scheduled Task but I get nothing in the log. Is this not possible? Morten A. Steien

asked Jul 20, 2020 by Morten A. Steien (150 points)
0 votes
1 answer

I have an ADP Sync scheduled task that modifies and creates users from a csv file. I also have reports that show new users created and management history for user ... ADP Sync scheduled task so that they only run after the ADP Sync task is complete?

asked Jan 7, 2020 by barberk (60 points)
0 votes
1 answer

I have a scheduled task that runs a Powershell script against an AD group, "Group 1". I need to get all of the members of Group 1, and add them to Group 2. The ... identity in the error message start with 'user;'? What is the correct way to accomplish this?

asked Aug 27, 2019 by ngb (90 points)
2,740 questions
2,474 answers
1,366,768 users