A
A
Alexander2021-11-12 17:30:35
cmd/bat
Alexander, 2021-11-12 17:30:35

Running bat when connected via RDP?

There is a server with 1C, people connect there via RDP, when entering / exiting, powershell is launched and sends a log to the server.
But since 1C can process for hours, the server does not have a timeout for logging out and ending the session, and if the user logs out and logs back into the server (Without logging out, just close the window), then Windows will naturally not run the powershell script and there is silence in the logs. Is there a way to run a bat/ps1 script on any RDP login?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
pavelsha, 2021-11-12
@pavelsha

Built-in Windows Task Shelduer (Task Scheduler)
Create tasks for the right users by trigger. For example, on a "login" or "session connection" trigger
AND a perpendicular question:
Why do long running processing in a user's session. Is the 1C scheduled task not suitable in your case?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question