Combining Sync tasks and Scheduled tasks into one "item" to make running manually much simpler.

We currently have a daily process that runs multiple sync jobs all timed one hour apart. In between those sync jobs are scheduled scripts to make additional changes based on the sync job. This runs fine except when the process needs to be stopped because a downstream system is not ready for sync. My plan is to try and combine the sync jobs and scheduled tasks into something (workflow, manually run task, external powershell script) so that this entire process can be run by the click of a button. First off as you can see, I am not exactly sure the best way to combine the above steps and what container would hold those steps. Here is the example morning process:

6:00AM Sync runs against system A

6:30AM multiple scheduled tasks run.

7:00AM Sync runs against system B

7:30AM multiple scheduled tasks run.

8:00AM Sync runs against system C.

8:30AM multiple scheduled tasks run.

Because all of these steps need to run in order, if the process needs to be paused because of a downstream system and then run manually, it is painful to run and wait, run and wait, run and wait.

Any suggestions on how to attack this?

I see that by using Connect-QCService and Start-QCWorkflow I can run the sync jobs manually from an external Powershell script. Can I also add in the running of the scheduled tasks to this script? If so then that would be a solution. And yes the scheduled tasks use included library scripts also if that is a deal breaker.

Thanks,

Rick

ARS 7.4.5 soon to be 7.6.1

Parents
  • You can definitely fire your AR scheduled tasks with PoSh as you suggest.  

    Depending on whether your scripts are modifying AD properties or not, if they are you might consider using AR Change Workflows which would react to attribute changes being made by the scripts and thus help manage your sequencing.

    This is one of those cases where the devil is very much in the details as far as solutioning the best combination of approaches.

  • Thanks. Yes they are modifying AD properties but at this time, I kind of just wanted to combine what is already tried and true (tested) but put it together into one manually run script so that when things fail overnight the entire process can be run with the click of a button. So far I have figured out how to run the scheduled workflows, I am still stuck on how scheduled tasks can be run inside this same script. Is it as simple as querying for the Scheduled Task (like I did above) and then setting a bit to rerun it right now?

    I like your idea of using change workflows to update this entire overnight process. I will look into that for a future cleanup of this process.

  • Here's a snippet for you for firing a scheduled task:

    set-qadobject -proxy -identity "CN=Test Task,CN=Scheduled Tasks,CN=Server Configuration,CN=Configuration" -objectAttributes @{edsvaExecuteNow=$true}

Reply Children
No Data