diff --git a/Orchestrator/HowToConfigureOrchestrator.txt b/Orchestrator/HowToConfigureOrchestrator.txt new file mode 100644 index 00000000..93c7fd9c --- /dev/null +++ b/Orchestrator/HowToConfigureOrchestrator.txt @@ -0,0 +1,3 @@ +1. Create user for Orchestrator console session (pay attention for administrator rights - is needed for RobotRDPActive) - how to create user look windows instructions +2. Create AutoAdminLogon in windows for Orchestrator user - go in console session when restart (Utils/AutoLogon(ProtectedPassword).zip) - https://docs.microsoft.com/en-us/sysinternals/downloads/autologon +3. Add Orchestrator in startup - win+r > shell:startup > add shortcut of orchestrator \ No newline at end of file diff --git a/Orchestrator/Settings/SettingsOrchestratorExample.py b/Orchestrator/Settings/SettingsOrchestratorExample.py index 4b9ec9b8..e5959cf9 100644 --- a/Orchestrator/Settings/SettingsOrchestratorExample.py +++ b/Orchestrator/Settings/SettingsOrchestratorExample.py @@ -131,6 +131,22 @@ def Settings(): } ] }, + "OrchestratorStart":{ + "ActivityList":[ + #{ + # "Type": "ProcessStop", #Activity type + # "Name": "OpenRPARobotDaemon.exe", #Process name + # "FlagForce": True, #Force process close + # "User": "%username%" #Empty, user or %username% + #}, + #{ + # "Type": "ProcessStartIfTurnedOff", #Activity type + # "CheckTaskName": "notepad.exe", #Python function module name + # "Path": "notepad", #Python function name + # "ArgList": [] #Input python function args + #} + ] + }, "Scheduler": { "ActivityTimeCheckLoopSeconds":5, #Количество секунд, между циклами проверки действий "ActivityTimeList": [ diff --git a/Sources/pyOpenRPA/Orchestrator/Orchestrator.py b/Sources/pyOpenRPA/Orchestrator/Orchestrator.py index 04a4ca5b..c99c8192 100644 --- a/Sources/pyOpenRPA/Orchestrator/Orchestrator.py +++ b/Sources/pyOpenRPA/Orchestrator/Orchestrator.py @@ -48,6 +48,9 @@ lThreadServer = Server.RobotDaemonServer("ServerThread", mGlobalDict) lThreadServer.start() #Logging mGlobalDict["Logger"].info("Scheduler loop init") +# Выполнить активности при старте +for lActivityItem in mGlobalDict["OrchestratorStart"]["ActivityList"]: + Processor.ActivityListOrDict(lActivityItem) #Вечный цикл while True: lCurrentDateTime = datetime.datetime.now() diff --git a/Utils/AutoLogon(ProtectedPassword).zip b/Utils/AutoLogon(ProtectedPassword).zip new file mode 100644 index 00000000..0a13f4e7 Binary files /dev/null and b/Utils/AutoLogon(ProtectedPassword).zip differ