Help in scheduling a trigger for the mentioned scenario

I have to schedule password reset process that resets password for a application whose users expires every 30 days … so on 30th day the process should execute and reset password before expiry .

One more thing is , this process should run when no other processes are running to avoid clash … so it should ran on Saturday 8 AM .

Can someone please help in how to schedule this trigger ?

@Ragavi_Rajasekar one side you are saying it should run on the 30th days before the password expires, and on the other side you are saying it should run on Saturday what if the Saturday is not there on the 30th day?

You can consider one logic as below.

Set an asset value with the ResetDate and in the code build a logic that compare the ResetDate value with today’s Date and if the count is >=29 then go for the reset.

And this process you can schedule to run whenever is suitable as per the robots availability.

1 Like

Create a Time Trigger:

Type: Weekly
Day: Saturday
Time: 08:00 AM
Conflict Resolution: Skip

Keep a logic in your Main.xml

Store your last successful password reset date in an Orchestrator Asset (e.g : LastResetDate).

Each time the robot runs on Saturday at 8 AM, check if 30 days have passed:

Assign
lastReset = Date.Parse(GetAsset(“LastResetDate”))

If Now >= lastReset.AddDays(30) Then
’ Reset password logic here
’ After resetting, update the asset:
SetAsset(“LastResetDate”, Now.ToString(“yyyy-MM-dd”))
Else
’ Not yet 30 days - exit
End If

This logic will work even if the month has 31 days, 30 days , 29 days (Leap year)

1 Like

@Ragavi_Rajasekar

Follow the below steps for your process,
lets assume from today password will expire in 30 days,

  1. create asset with today date.
  2. in your process get this asset value.
  3. get the difference of asset date value and current date value in days
  4. add a condition check that difference is greater than 30
  5. If it is greater than 30, in then section you can use your update password.
  6. Update that reset date into date asset

If you are using on folder that running in one machine, even that job is running then it will went to pending once that job completes then it will start the execution.

if you are using multiple machines then you need to add one more condition that is there any jobs are running or not, if yes then send the stop request using orchestrator api.

Above process you can add in main flow or create with new process and add trigger that daily needs to run at 8AM

1 Like

Hello @Ragavi_Rajasekar

To make sure the expectations are met, you could consider resetting the passwords prior to the exact day that it expires.
Is it possible to do if after lets say 20 days? Or would that mess up something else?

If the reset is acceptable based on a shorter time span, then you should simply be able to make an ordinary timed trigger, based on your requirements (every Saturday @ 8 AM).

You could utilize queues or an Excel file to keep track of which accounts needs a reset.

Regards
Soren

1 Like

Hi @Ragavi_Rajasekar

You can handle this scheduling requirement using Orchestrator time triggers along with some logic inside your code itself.

Create a time trigger that runs the process every Saturday at 08:00 AM.

Inside the main workflow, check whether 30 days have passed since the last password reset:

  • Store the last reset date in an Orchestrator Asset.
    lastReset = Date.Parse(GetAsset(“LastResetDate”))
  • Each Saturday run, compare Now with the stored date.
  • If >= 30 days, proceed with the password reset logic.
    If Now >= lastReset.AddDays(30)
  • After reset, update the asset with the new date.

Orchestrator will queue the job and execute it only when a robot is available when another process is running.

1 Like

Hi @Ragavi_Rajasekar

Simple,

  1. Set the schedule to run Weekly → Saturday → 08:00 AM I agreed with @sanjit_pal we can’t use this logic so he provided the good approch :slight_smile:

  2. Set your password‑reset job trigger priority to High or Critical so it waits until the machine is free and executes first.

  3. Only if possible ( assign this process to a dedicated Unattended Runtime)

Nandri :slight_smile:

1 Like

Thank you for the solution

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.