Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows services and multiple logged in users

I'm developing a Windows service which will run at a specific time every day. What will happen if multiple users are logged in to that machine? Will it run 5 times at the same time if there're 5 users logged in? If it does, is there a way to prevent it?

like image 616
dstr Avatar asked Jun 03 '26 10:06

dstr


1 Answers

A windows service is installed machine-wide and runs under one specified user account, which may in fact not be a "user," but "Local System" or "Network Service" or similar.

The service will run only once without regard to logged on users. In fact, it will run if the computer is on, even if no user has logged on.

like image 99
Jay Avatar answered Jun 06 '26 06:06

Jay