How to check 1st run of process in a day


Suppose any process needs to be triggered 3 to 4 times per day. How we can find out the whether it is 1st time process triggered in day or 2nd time or 3rd time or 4th time in a day ?

My requirement is - on every 1st day of month and 1st run of process on that day we have create a new report and send it. How we can acheive it

Simplest way will be to store the Last Run Time in some location and then check at the start of process if it matches against your rules.

So, the initial steps in your process will be -

  1. Read the last run time from a file or data service or orchestrator asset
  2. Check if the process has already ran for this month. If it has do nothing, if it has not, run your report logic.
  3. Update the file or data service or orchestrator asset with the updated run time.
  4. Continue with your remaining logic

Hello @ankit.saraf,

The process flow is as below.

  1. This process will be triggered daily 3-4 times.
  2. The report will shared on the monthly first run only.

Here we have to check first whether current date is 1st date of month and is the 1stly run ? if yes then only send the report.

and for remaining run (2dn,3rd,4th run) of each day, we have update the report only.

How we can acheive it ?

the report will be shared on 1st day of month and 1st run of that day.

As I said above, you need to write a workflow which checks when it was last ran. If the last ran time and current time match your criteria, you create & send the report or if it doesn’t match, you run the workflow normailly.

You can do this additional check as I described above in four steps. The only thing you need to decide apart from what I described above is where to store your last run time. You can store on the machine where your workflows run in a file or store it as a Orchestrator asset.