What is a background process?

I’m trying to really understand background v foreground processes. I thought that a background process basically had no GUI at all, just did some computation or something. To test this, I created a new “Background Process” in Studio and looked at the available activities. I’m confused that I see a Chrome Browser activity there. Isn’t that a GUI? So to test it I added it to my process and googled something, then scraped a website, after a delay. I wanted to see if I could get 2 or more “background processes” to run concurrently.

I then published it, and ran 1 in an attended mode from my mac, and also 1 in unattended mode from Orchestrator, also on Mac.

They ran concurrently. The browser was opened twice, and each process ran to completion.

Is this because one was lauched from Assistant and one from Orchestrator?

To test this I launched the same process twice from Orchestrator, to see if they would run concurrently. I used 2 different robot accounts. In this case, the second job stayed pending until the first one was finished, and only then ran to completion.

Can someone clearly explain why this happened? The docs are confusing here.
Would they run simultaneously if there was no GUI? Or does that have nothing to do with it – attended mode runs in a different session from unattended mode, and therefore they don’t block eachother?

So is it possible to run 2 background processes in unattended mode from Orchestrator on the same machine?

EDIT: I got it to run concurrently. It’s a licensing (runtime) issue. The free version grants you 2 runtimes, one in Testing and one in Production. When I launched the processes using one each, they both ran.

I’m still a bit confused on the term “background process” though. Does that just mean it doesn’t use or require Windows?

Yes, but the Background Process that I created opens a browser. Is that not a UI?

You can use Chromium API or Simulate as the input type, and therefore it doesn’t interfere with the mouse/keyboard the way Hardware Events does. Although you would see Chrome open and things happening in it, which could logically get in the way of what the user is trying to do.

Some slightly misleading stuff here stating things that a background process can do which it cant (like opening chrome etc). (caveat, my experience is all Windows, I have to assume Mac is the same). Pauls answer is incorrect in this context, thats related to attended bots only and the process being background or not would be irrelevant, which Picture in Picture mode being a more logical thing to discuss in that context.

So the background thing is just a flag. If you run it whilst you are logged on it can still do things like open a browser, open Excel etc, there is no validation in the project to hide or remove things that require the Ui.

In your scenario they both worked because you were already logged onto your Mac, so because the session was open already foreground stuff was possible.

If you logged off your Mac entirely and then ran then unattended background stuff, if it works like Windows, then it will run the stuff in Session 0, which has no desktop, this means that you cannot open a Ui application like Excel or Chrome etc and you will get an error.

Can you expand on that Session 0 stuff? Not sure how to do that. I only know how to use my laptop when I’m logged on. By that I mean I open it and put in my password. Or do you mean logged into Orchestrator? But it has to be in order to run unattended — no? How do I run something in Session 0?

I mean his description clearly stated that he ran it while he was logged in, making my answer perfectly accurate in the context of his description…but OK.

@Terry_Marr

Session 0 basically runs as a localhost and not the user account…so no gui would be assigned

When you select background as @Jon_Smith mentioned UiPath would not validate thw activities you use so you can still use those activities but when run from orchetsrator it would fail

Basically unattended is to run the bot without logging into the machine…from a physical machine and with community license this is not possible as community license does not have service mode installation which is required for robot user to login to the machine…

So in your case as uou are already logged in the current session is used and no issue has been faced but when run truly unattended then as gui is not present it would fail with error

And yes backgeound process can run simultaneously on same system but still runtimes are consumed the same way…you can run 2 process at once but 2 runtimes are needed but can be run on same machine if it is backgeound

Cheers

Cheers

@Anil_G Thank you for your clarification. This is all a bit confusing for beginners.

So am I understanding that a background process (a true one, not one as dictated by Studio), has NO GUI at all, not even Chrome browser? Does it still run on Windows OS?

One more question – is it possible to have UiPath installed in both service mode and user mode on the same machine? Just so I can play with them both? I’m very curious about service mode, but as a mere learner with the Community edition, I’m a bit frustrated that I can’t really get to work with it on my own.

@Terry_Marr

Yes background can run on windows as well

Yes you can install UiPath on both service and usermode…but ideally if you install service mode that should suffice for you to run in attended and unattended as well

And yes community does jot have service now

Cheers

Yes background can run on windows as well
So does that mean service mode MUST run on Windows OS? Or is that optional?

Yes you can install UiPath on both service and usermode…but ideally if you install service mode that should suffice for you to run in attended and unattended as well
But if run in service mode that means no UI at all, correct?

And yes community does jot have service now
So I can’t install both on user mode and service mode on my machine, correct?

@Terry_Marr

Service mode does not mean background…service mode is afor any unattended robot…rather it be a foreground or background…

Community by default will be only user mode…suited for attended automation…you can run unattended but not by logging off the system

Cheers

Yeah, but can you see why its confusing when someone is struggling to understand the difference between background and foreground to explain it like that?
If a user asks what is the difference between attended vs unattended but describe running it as attended you dont explain they are the same and that unattended does things that can only be done on attended. Same applies here, make the extra effort and explain it clearly.

I think you mistyped here, Unattended does log into the machine, unless its a background unattended, in which case it uses session 0, this can be changed, but thats the default.

I dont agree here, I cannot find the exact resources, but with a single licence I believe you can run a foreground and background process at the same time.
Happy to be corrected if I am wrong or that changed.

Community is for non-commercial use only, so the limitations make sense, if you want to run unattended automations you should purchase a licence.

@Jon_Smith

What I meant was unattended automations are to be run with keeping the machine logged out and not keep it logged in and yes bot would login

Also for each background or foreground we need a runtime

cheers

Yeah ok, I understand what you mean, a person doesnt need to be logged in, indeed, but the robot does log in.

Regarding licences, like I said, I dont agree. With a single licence I believe you can run a foreground and background process at the same time.

1 Like

@Jon_Smith

FYI

cheers