0 votes

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 modifications within the past 24 hours. The reports are scheduled to run 30 minutes after the ADP Sync schedule. This works if everything runs on schedule. However, if I manually run or if the scheduled task is delayed, I must also manually run the reports. How can I generate the reports as part of the ADP Sync scheduled task so that they only run after the ADP Sync task is complete?

by (290 points)

1 Answer

+1 vote
by (217k points)
selected by
Best answer


To run a Report Scheduled Task in the ADP Sync Scheduled Task, you need to add the Run a program or PowerShell script action that will execute the below script to it. The action should be placed as the last one in the Scheduled Task. In the script, the $myReportScheduledTaskName variable specifies the name of the Report Scheduled Task to run. The script can be also used in Custom Commands and Business Rules.

$myReportScheduledTaskName = "Daily" # TODO: modify me

# Get the 'Report Schedule' container path
$reportScheduledTasksPath = $Context.GetWellKnownContainerPath("ReportSchedule")

# Bind to the Report Scheduled Task
$reportScheduledTasksPathObj = New-Object "Softerra.Adaxes.Adsi.AdsPath" $reportScheduledTasksPath
$myReportScheduledTaskAdsPath = $reportScheduledTasksPathObj.CreateChildPath("CN=$myReportScheduledTaskName")
$myReportScheduledTask = $Context.BindToObject($myReportScheduledTaskAdsPath)

# Run the Report Scheduled Task

Related questions

0 votes
1 answer

Hello - I'm working on my companies off boarding process and need to run a Custom Command that turns off access to different systems and resources at the ... -9612-c7c982baa49f}" $user.ExecuteCustomCommand($commandID) # Save the Scheduled Task $task.SetInfo()

asked Jul 16, 2015 by jakesomething (1.1k points)
0 votes
1 answer

Hi, I need to start Adaxes scheduled task from Powershell console running on another host. How can I do that?

asked May 21 by KIT (3.1k points)
0 votes
1 answer

I have a feild called Decommissioned Date and I can not figure out how to run a scheduled task the day after that date. So If an account got decommissioned today I want the task to run tomorrow.

asked Jan 9 by hgletifer (6.8k points)
0 votes
1 answer

I would like to add a parameter for country to a custom command. Since the country has to be entered correctly in order for Active Directory to accept it, I would like to ... ? I didn't find it in the documentation and the sample scripts didn't use parameters.

asked Jun 4 by mark.it.admin (5k points)
0 votes
1 answer

Adaxes version is 2018.2. I have build a custom report, and I don't want the 'Name' column with the pictures to appear in it. But it seem to be mandatory, it is greyed ... . Is there a way to remove / hide / or change the mandatory attribute or column ? Thanks

asked Jan 9 by Isabelle (280 points)
2,352 questions
2,106 answers
127,334 users