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)
0

I figured this out nevermind.

1 Answer

+2 votes
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

The script create two reports of inactive workstation operating systems. The report is too detailed to run from one of the adaxes reports. Basically how can I set the script up to ... sure How I did this but I can't find it now (probably something simple).

asked 6 days ago by mightycabal (240 points)
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, 2021 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 (570 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.3k points)
2,883 questions
2,602 answers
6,755 comments
118,496 users