2 Procceses 1 Machine

I need to do two tasks in one machie:

  • First of them, has to continously check email and do an action (action of ~10 minutes) per each unreaded email.
  • Second of them, has to execute a other action every 24 hours.

How can I manage these two distinct tasks with my Robot and Orchestrator?

I have to create 2 Processes and iterate between them?
I have to create 1 Process that do two actions??
I have to create 2 Schedules ?
I have to create 2 Processes that call each other with Orchstrator.StartJob functionality?

Hi Marco,

I have to create 2 Processes and iterate between them?
- I don’t understand the logic properly
I have to create 1 Process that do two actions??-
Can be achieved using this but you have to imply the logic in the workflow to calculate the Next interval of calling the other process.
I have to create 2 Schedules?
-recommended as it will help you to monitor the execution as well and you will be able to see which process runs at what number of time
I have to create 2 Processes that call each other with Orchestrator.StartJob functionality?
can be achieved using this but you have to imply the logic in the workflow to calculate the Next interval of calling the other process.

Creating 2 schedules has a problem. I don’t really know how much time It takes. If my interval is too much, the robot will be desoccuped the major part of the day. If the interval is very Little, scheduling will enqueue a large number of tasks that are created faster than consumed.

Should I check in every task finish if I have to call Orchestrator.StartJob of one or other job?

Which alternative is more maintainable and do not break the robots architecture?

I need one task to be executed on loop all the day and night Except at around 12 pm when Other task has to be executed 1 time, and when it finished, robot continue on loop of first task.

How can I set that in Orchestrator??

Hi @MarcoRojas

Run your loop task all day and then stop it long enough to start your 12 pm job and then immediately restart it and let Orchestrator handle the rest. It will wait until the 12 pm job is finished and then start back up.

From https://orchestrator.uipath.com/docs/about-schedules

“If you set multiple schedules on the same Robot and their execution time overlaps at least one time, the jobs are queued, in a pending state. The Robot executes the queued jobs in chronological order.”

Regards
Troy

Thank you Tmays. Yes , what you said will work. But my idea is do not interact with orchestrator (only on errors and initial job start). If it is possible , get robot working without human interaction.

The unique solution I have found is: start process in orchestrator, when process ends, it start a orchestrator job, the job could be type 1 or 2 (normal-job, 12pm-job) it will ask to him "should I start a job type 1 or 2? " And respond him with some logic and start the specific job, then that job will ask the same when it ends, and that way indefinitely.

Is that a good approach?
It breaks something in Uipath robot architecture?

You could do something like set a variable for 12pm today (NextTask2Run = now.tostring(“yyMMdd”)&“120000”) at the beginning of task 1 but before your loop and then in task 2 set the variable to 12pm tomorrow (NextTask2Run = now.addDays(1).ToString(“yyMMdd”)&“120000”). Then have an IF in your loop that says IF Now.ToString(“yyMMddHHmmss”) > NextTask2Run Invoke task 2 Workflow. When it’s done it will continue with task 1. Of course if you start the process after 12pm it would run task 2 on the first loop. …and you have to pass the new NextTask2Run time back to task 1.

Does that make any sense?

I’m sure there’s a better way but that seems like an option. Dunno. :slight_smile:

@MarcoRojas

Like this:

Main.xaml (10.1 KB)
DoThislAt12pm.xaml (9.0 KB)

1 Like

Thank you Tmays for your good disposition and your responses :slight_smile:

You have help me a lot.