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 (60 points)

1 Answer

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

Hello,

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
$myReportScheduledTask.RunNow()

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 (190 points)
0 votes
1 answer

Currently, when I disable a user account in Adaxes, the group memberships of the user remain intact. I'd like to automate the removal of group memberships such as distribution ... a list of groups/DL that the user was previously in and removed from. Thanks!

asked Nov 3 by jayden.ang (20 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, 2020 by KIT (500 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, 2020 by hgletifer (1.2k points)
0 votes
1 answer

I am attempting to give some users rights to modify the report that is scheduled such as to add additional users or remove users or even move the report to a different ... i grant the rights to just modify the scheduled reports? Thank you for your help!

asked Sep 28 by mark.it.admin (1.7k points)
2,609 questions
2,346 answers
6,232 comments
864,364 users