# Terminator.IsSignalClose() # True - WM_CLOSE SIGNAL has come
# StopSafe.IsSafeStop() # True - WM_CLOSE SIGNAL has come. taskkill /im someprocess.exe
# Terminator.SessionLogoff() # Logoff the session
"""
importwin32con
importwin32con
importwin32gui
importwin32gui
@ -12,33 +14,35 @@ gLogger = None
gWindowTitleStr="PythonTerminator"# Title of the phantom window
gWindowTitleStr="PythonTerminator"# Title of the phantom window
gWindowDescriptionStr="pyOpenRPA library for safe turn off the program (by send the WM_CLOSE signal from task kill)"# Description of the phantom window
gWindowDescriptionStr="pyOpenRPA library for safe turn off the program (by send the WM_CLOSE signal from task kill)"# Description of the phantom window
<td><p>Send signal via power shell to restart remote PC ATTENTION: Orchestrator user need to have restart right on the Remote machine to restart PC.</p></td>
<td><p>Send signal via power shell to restart remote PC ATTENTION: Orchestrator user need to have restart right on the Remote machine to restart PC.</p></td>
<td><p>Check _SessionLast_RDPList.json and _SessionLast_StorageDict.pickle in working directory. if exist - load into gsettings # _SessionLast_StorageDict.pickle (binary) _SessionLast_RDPList.json (encoding = “utf-8”) _SessionLast_StorageDict.pickle (binary).</p></td>
<td><p>Check _SessionLast_RDPList.json and _SessionLast_StorageDict.pickle in working directory. if exist - load into gsettings # _SessionLast_StorageDict.pickle (binary) _SessionLast_RDPList.json (encoding = “utf-8”) _SessionLast_StorageDict.pickle (binary).</p></td>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">AgentOSLogoff</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inHostNameStr</span></em>, <emclass="sig-param"><spanclass="n">inUserStr</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#AgentOSLogoff"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSLogoff"title="Permalink to this definition">¶</a></dt>
<dd><p>Logoff the agent user session</p>
<dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>GUID String of the ActivityItem - you can wait (sync or async) result by this guid!</p>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">AgentProcessWOExeUpperUserListGet</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inHostNameStr</span></em>, <emclass="sig-param"><spanclass="n">inUserStr</span></em>, <emclass="sig-param"><spanclass="n">inGSettings</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#AgentProcessWOExeUpperUserListGet"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.AgentProcessWOExeUpperUserListGet"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">AgentProcessWOExeUpperUserListGet</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inHostNameStr</span></em>, <emclass="sig-param"><spanclass="n">inUserStr</span></em>, <emclass="sig-param"><spanclass="n">inGSettings</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#AgentProcessWOExeUpperUserListGet"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.AgentProcessWOExeUpperUserListGet"title="Permalink to this definition">¶</a></dt>
@ -1111,6 +1138,13 @@ Thread safe - you can call def even if you dont init the orchestrator - def will
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">OSLogoff</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#OSLogoff"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.OSLogoff"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">OSRemotePCRestart</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inHostStr</span></em>, <emclass="sig-param"><spanclass="n">inForceBool</span><spanclass="o">=</span><spanclass="default_value">True</span></em>, <emclass="sig-param"><spanclass="n">inLogger</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#OSRemotePCRestart"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.OSRemotePCRestart"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">OSRemotePCRestart</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inHostStr</span></em>, <emclass="sig-param"><spanclass="n">inForceBool</span><spanclass="o">=</span><spanclass="default_value">True</span></em>, <emclass="sig-param"><spanclass="n">inLogger</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#OSRemotePCRestart"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.OSRemotePCRestart"title="Permalink to this definition">¶</a></dt>
@ -1228,6 +1262,18 @@ ATTENTION: Orchestrator user need to have restart right on the Remote machine to
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">OrchestratorScheduleGet</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span>→<module ‘schedule’ from ‘c:\abs\archive\scopesrcul\pyopenrpa\resources\wpy64-3720\python-3.7.2.amd64\lib\site-packages\schedule\__init__.py’><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#OrchestratorScheduleGet"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorScheduleGet"title="Permalink to this definition">¶</a></dt>
<dd><p>Get the schedule (schedule.readthedocs.io) from the Orchestrator</p>
<p>Fro example you can use:</p>
<dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>schedule module. Example see here <aclass="reference external"href="https://schedule.readthedocs.io/en/stable/examples.html">https://schedule.readthedocs.io/en/stable/examples.html</a></p>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">OrchestratorSessionRestore</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inGSettings</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#OrchestratorSessionRestore"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionRestore"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">OrchestratorSessionRestore</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inGSettings</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#OrchestratorSessionRestore"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionRestore"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">OrchestratorThreadStart</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inDef</span></em>, <emclass="sig-param"><spanclass="o">*</span><spanclass="n">inArgList</span></em>, <emclass="sig-param"><spanclass="o">**</span><spanclass="n">inArgDict</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#OrchestratorThreadStart"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorThreadStart"title="Permalink to this definition">¶</a></dt>
<dd><p>Execute def in new thread and pass some args with list and dict types</p>
<spanclass="s2">"CheckIntervalSecFloat"</span><spanclass="p">:</span><spanclass="mf">5.0</span><spanclass="p">,</span><spanclass="c1"># Check interval in seconds</span>
<spanclass="s2">"CheckIntervalSecFloat"</span><spanclass="p">:</span><spanclass="mf">5.0</span><spanclass="p">,</span><spanclass="c1"># Check interval in seconds</span>
<spanclass="nb">print</span><spanclass="p">(</span><spanclass="s2">"!WARNING! Current orchestrator settings do not support old type of the Orchestrator start. Use new Orchestrator type start (see v1.2.0)"</span><spanclass="p">)</span>
<spanclass="nb">print</span><spanclass="p">(</span><spanclass="s2">"!WARNING! Current orchestrator settings do not support old type of the Orchestrator start. Use new Orchestrator type start (see v1.2.0)"</span><spanclass="p">)</span>
<codeclass="sig-prename descclassname">pyOpenRPA.Tools.StopSafe.</code><codeclass="sig-name descname">Init</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inLogger</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Tools/StopSafe.html#Init"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Tools.StopSafe.Init"title="Permalink to this definition">¶</a></dt>
<dd><p>Init the StopSafe module. After that you can use def IsStopSafe() to check if close signal has come.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>inLogger</strong>– Logger to log messages about StopSafe</p>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dlclass="py function">
<dtid="pyOpenRPA.Tools.StopSafe.IsStopSafe">
<codeclass="sig-prename descclassname">pyOpenRPA.Tools.StopSafe.</code><codeclass="sig-name descname">IsStopSafe</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Tools/StopSafe.html#IsStopSafe"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Tools.StopSafe.IsStopSafe"title="Permalink to this definition">¶</a></dt>
<dd><p>Check if stop signal has come.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p></p>
</dd>
</dl>
</dd></dl>
<divclass="section"id="references">
<h2>References<aclass="headerlink"href="#references"title="Permalink to this headline">¶</a></h2>
<spanclass="n">mAgentMuteBool</span><spanclass="o">=</span><spanclass="kc">False</span><spanclass="c1"># Mute any sends to agent while some action is perfomed</span>
<spanclass="sd"> Set ManualStopTrigger (MST) to switch to STOPPED MANUAL if specified count of start fails will be catched in specified time period</span>
<spanclass="sd"> :param inMSTdTSecFloat: Time perios in seconds</span>
<spanclass="sd"> :param inMSTdNInt: Counts of the start tries</span>
<spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">mMSTStartTimeList</span><spanclass="o">.</span><spanclass="n">append</span><spanclass="p">(</span><spanclass="n">lTimeNowSecFloat</span><spanclass="p">)</span><spanclass="c1"># Append current time to MST list</span>
<spanclass="c1"># Remove old items from list</span>
<spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">mMSTStartTimeList</span><spanclass="o">=</span><spanclass="n">lMSTStartTimeList</span><spanclass="c1"># Set new list</span>
<spanclass="sd"> Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):</span>
<spanclass="sd"> Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):</span>
<spanclass="sd"> Manual/Auto start. Manual start will block scheduling execution. To return schedule execution use def Manual2Auto</span>
<spanclass="sd"> Manual/Auto start. Manual start will block scheduling execution. To return schedule execution use def Manual2Auto.</span>
<spanclass="sd"> Will not start if STOP SAFE is now and don't start auto is stopped manual now</span>
<spanclass="sd"> :param inIsManualBool: Default is True - Mark this operation as manual - StatusCheckStart/Stop will be blocked - only StatusCheck will be working. False - Auto operation</span>
<spanclass="sd"> :param inIsManualBool: Default is True - Mark this operation as manual - StatusCheckStart/Stop will be blocked - only StatusCheck will be working. False - Auto operation</span>
<spanclass="sd"> :return: Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
<spanclass="sd"> :return: Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
<spanclass="sd">"""</span>
<spanclass="sd">"""</span>
<spanclass="k">if</span><spanclass="n">inIsManualBool</span><spanclass="o">==</span><spanclass="kc">False</span><spanclass="p">:</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">ManualStopTriggerNewStart</span><spanclass="p">()</span><spanclass="c1"># Set the time</span>
<spanclass="n">lStr</span><spanclass="o">=</span><spanclass="sa">f</span><spanclass="s2">"Managers.Process (</span><spanclass="si">{</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">mAgentHostNameStr</span><spanclass="si">}</span><spanclass="s2">, </span><spanclass="si">{</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">mAgentUserNameStr</span><spanclass="si">}</span><spanclass="s2">, </span><spanclass="si">{</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">mProcessNameWOExeStr</span><spanclass="si">}</span><spanclass="s2">): Process will not start because of stopped manual or stop safe is now."</span>
<spanclass="sd"> Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto</span>
<spanclass="sd"> Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto</span>
<spanclass="sd"> :param inIsManualBool: Default is True - Mark this operation as manual - StatusCheckStart/Stop will be blocked - only StatusCheck will be working. False - Auto operation</span>
<spanclass="sd"> :param inIsManualBool: Default is True - Mark this operation as manual - StatusCheckStart/Stop will be blocked - only StatusCheck will be working. False - Auto operation</span>
<spanclass="sd"> :return:</span>
<spanclass="sd"> :return: Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
<spanclass="n">lL</span><spanclass="o">.</span><spanclass="n">info</span><spanclass="p">(</span><spanclass="sa">f</span><spanclass="s2">"Managers.Process (</span><spanclass="si">{</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">mAgentHostNameStr</span><spanclass="si">}</span><spanclass="s2">, </span><spanclass="si">{</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">mAgentUserNameStr</span><spanclass="si">}</span><spanclass="s2">, </span><spanclass="si">{</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">mProcessNameWOExeStr</span><spanclass="si">}</span><spanclass="s2">): Safe stop has been wait for </span><spanclass="si">{</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">mStopSafeTimeoutSecFloat</span><spanclass="si">}</span><spanclass="s2"> sec. Now do the force stop."</span><spanclass="p">)</span>
<spanclass="sd"> Manual/Auto stop force. Force stop dont wait process termination - it just terminate process now.</span>
<spanclass="sd"> Manual/Auto stop force. Force stop don't wait process termination - it just terminate process now.</span>
<spanclass="sd"> Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto</span>
<spanclass="sd"> Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto</span>
<spanclass="sd"> :param inIsManualBool: Default is True - Mark this operation as manual - StatusCheckStart/Stop will be blocked - only StatusCheck will be working. False - Auto operation</span>
<spanclass="sd"> :param inIsManualBool: Default is True - Mark this operation as manual - StatusCheckStart/Stop will be blocked - only StatusCheck will be working. False - Auto operation</span>
<spanclass="sd"> :return: Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
<spanclass="sd"> :return: Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
<spanclass="sd"> Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto</span>
<spanclass="sd"> Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto</span>
<spanclass="sd"> :param inIsManualBool: Default is True - Mark this operation as manual - StatusCheckStart/Stop will be blocked - only StatusCheck will be working. False - Auto operation</span>
<spanclass="sd"> :param inIsManualBool: Default is True - Mark this operation as manual - StatusCheckStart/Stop will be blocked - only StatusCheck will be working. False - Auto operation</span>
<spanclass="sd"> :return:</span>
<spanclass="sd"> :return: Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
<spanclass="sd"> Manual restart will block scheduling execution. To return schedule execution use def Manual2Auto</span>
<spanclass="sd"> Manual restart will block scheduling execution. To return schedule execution use def Manual2Auto</span>
<spanclass="sd"> :param inIsManualBool: Default is True - Mark this operation as manual - StatusCheckStart/Stop will be blocked - only StatusCheck will be working. False - Auto operation</span>
<spanclass="sd"> :param inIsManualBool: Default is True - Mark this operation as manual - StatusCheckStart/Stop will be blocked - only StatusCheck will be working. False - Auto operation</span>
<spanclass="sd"> :return:</span>
<spanclass="sd"> :return: Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
<spanclass="sd"> Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):</span>
<spanclass="sd"> :param inAgentHostNameStr: Agent hostname in any case. Required to identify Process</span>
<spanclass="sd"> :param inAgentUserNameStr: Agent user name in any case. Required to identify Process</span>
<spanclass="sd"> :param inProcessNameWOExeStr: The process name without extension .exe (the key of the Process instance). Any case - will be processed to the upper case</span>
<spanclass="sd"> :param inMSTdTSecFloat: Time periods in seconds</span>
<spanclass="sd"> :param inMSTdNInt: Counts of the start tries</span>
<spanclass="sd"> Clear the last start tries list.</span>
<spanclass="sd"> :param inAgentHostNameStr: Agent hostname in any case. Required to identify Process</span>
<spanclass="sd"> :param inAgentUserNameStr: Agent user name in any case. Required to identify Process</span>
<spanclass="sd"> :param inProcessNameWOExeStr: The process name without extension .exe (the key of the Process instance). Any case - will be processed to the upper case</span>
<spanclass="sd"> Logoff the agent user session</span>
<spanclass="sd"> :return: GUID String of the ActivityItem - you can wait (sync or async) result by this guid!</span>
<spanclass="sd">"""</span>
<spanclass="n">inGSettings</span><spanclass="o">=</span><spanclass="n">GSettingsGet</span><spanclass="p">()</span><spanclass="c1"># Set the global settings</span>
<spanclass="s2">"ArgGSettings"</span><spanclass="p">:</span><spanclass="s2">"inGSettings"</span><spanclass="p">,</span><spanclass="c1"># Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
<spanclass="s2">"ArgLogger"</span><spanclass="p">:</span><spanclass="kc">None</span><spanclass="c1"># Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
<spanclass="p">}</span>
<spanclass="c1">#Send item in AgentDict for the futher data transmition</span>
<spanclass="n">gSettingsDict</span><spanclass="p">[</span><spanclass="s2">"ServerDict"</span><spanclass="p">][</span><spanclass="s2">"WorkingDirectoryPathStr"</span><spanclass="p">]</span><spanclass="o">=</span><spanclass="n">os</span><spanclass="o">.</span><spanclass="n">getcwd</span><spanclass="p">()</span><spanclass="c1"># Set working directory in g settings</span>
<spanclass="n">gSettingsDict</span><spanclass="p">[</span><spanclass="s2">"ServerDict"</span><spanclass="p">][</span><spanclass="s2">"WorkingDirectoryPathStr"</span><spanclass="p">]</span><spanclass="o">=</span><spanclass="n">os</span><spanclass="o">.</span><spanclass="n">getcwd</span><spanclass="p">()</span><spanclass="c1"># Set working directory in g settings</span>
<spanclass="c1">#Инициализация сервера (инициализация всех интерфейсов)</span>
<spanclass="c1">#Инициализация сервера (инициализация всех интерфейсов)</span>
@ -2797,69 +2856,97 @@
<spanclass="n">lProcessorMonitorThread</span><spanclass="o">.</span><spanclass="n">start</span><spanclass="p">()</span><spanclass="c1"># Start the thread execution.</span>
<spanclass="n">lProcessorMonitorThread</span><spanclass="o">.</span><spanclass="n">start</span><spanclass="p">()</span><spanclass="c1"># Start the thread execution.</span>
<spanclass="k">if</span><spanclass="n">lL</span><spanclass="p">:</span><spanclass="n">lL</span><spanclass="o">.</span><spanclass="n">info</span><spanclass="p">(</span><spanclass="s2">"Processor monitor has been started"</span><spanclass="p">)</span><spanclass="c1">#Logging</span>
<spanclass="k">if</span><spanclass="n">lL</span><spanclass="p">:</span><spanclass="n">lL</span><spanclass="o">.</span><spanclass="n">info</span><spanclass="p">(</span><spanclass="s2">"Processor monitor has been started"</span><spanclass="p">)</span><spanclass="c1">#Logging</span>
<spanclass="n">gDaemonActivityLogDictRefreshSecInt</span><spanclass="o">=</span><spanclass="mi">10</span><spanclass="c1"># The second period for clear lDaemonActivityLogDict from old items</span>
<spanclass="n">gDaemonActivityLogDictLastTime</span><spanclass="o">=</span><spanclass="n">time</span><spanclass="o">.</span><spanclass="n">time</span><spanclass="p">()</span><spanclass="c1"># The second perioad for clean lDaemonActivityLogDict from old items</span>
<spanclass="n">lSchedulerThread</span><spanclass="o">.</span><spanclass="n">daemon</span><spanclass="o">=</span><spanclass="kc">True</span><spanclass="c1"># Run the thread in daemon mode.</span>
<spanclass="n">lSchedulerThread</span><spanclass="o">.</span><spanclass="n">start</span><spanclass="p">()</span><spanclass="c1"># Start the thread execution.</span>
<spanclass="n">lScheduleThread</span><spanclass="o">.</span><spanclass="n">daemon</span><spanclass="o">=</span><spanclass="kc">True</span><spanclass="c1"># Run the thread in daemon mode.</span>
<spanclass="n">lScheduleThread</span><spanclass="o">.</span><spanclass="n">start</span><spanclass="p">()</span><spanclass="c1"># Start the thread execution.</span>
<spanclass="c1"># Periodically clear the lDaemonActivityLogDict</span>
<spanclass="n">gDaemonActivityLogDictLastTime</span><spanclass="o">=</span><spanclass="n">time</span><spanclass="o">.</span><spanclass="n">time</span><spanclass="p">()</span><spanclass="c1"># Update the time</span>
<spanclass="n">lIterationLastDateTime</span><spanclass="o">=</span><spanclass="n">lDaemonLastDateTime</span><spanclass="c1"># Get current datetime before iterator (need for iterate all activities in loop)</span>
<spanclass="n">gDaemonActivityLogDictRefreshSecInt</span><spanclass="o">=</span><spanclass="mi">10</span><spanclass="c1"># The second period for clear lDaemonActivityLogDict from old items</span>
<spanclass="n">gDaemonActivityLogDictLastTime</span><spanclass="o">=</span><spanclass="n">time</span><spanclass="o">.</span><spanclass="n">time</span><spanclass="p">()</span><spanclass="c1"># The second perioad for clean lDaemonActivityLogDict from old items</span>
<spanclass="n">gDaemonActivityLogDictLastTime</span><spanclass="o">=</span><spanclass="n">time</span><spanclass="o">.</span><spanclass="n">time</span><spanclass="p">()</span><spanclass="c1"># Update the time</span>
<spanclass="c1">#часовой пояс пока не учитываем</span>
<spanclass="n">lIterationLastDateTime</span><spanclass="o">=</span><spanclass="n">lDaemonLastDateTime</span><spanclass="c1"># Get current datetime before iterator (need for iterate all activities in loop)</span>
<spanclass="k">if</span><spanclass="n">lL</span><spanclass="p">:</span><spanclass="n">lL</span><spanclass="o">.</span><spanclass="n">info</span><spanclass="p">(</span><spanclass="sa">f</span><spanclass="s2">"Scheduler:: Activity list is started in new thread. Parameters are not available to see."</span><spanclass="p">)</span><spanclass="c1">#Logging</span>
<spanclass="n">lIterationLastDateTime</span><spanclass="o">=</span><spanclass="n">datetime</span><spanclass="o">.</span><spanclass="n">datetime</span><spanclass="o">.</span><spanclass="n">now</span><spanclass="p">()</span><spanclass="c1"># Set the new datetime for the new processor activity</span>
<spanclass="c1"># Проверка дней недели, в рамках которых можно запускать активность</span>
<spanclass="k">if</span><spanclass="n">lL</span><spanclass="p">:</span><spanclass="n">lL</span><spanclass="o">.</span><spanclass="n">exception</span><spanclass="p">(</span><spanclass="sa">f</span><spanclass="s2">"Scheduler: Exception has been catched in Scheduler module when activity time item was initialising. ActivityTimeItem is </span><spanclass="si">{</span><spanclass="n">lItem</span><spanclass="si">}</span><spanclass="s2">"</span><spanclass="p">)</span>
<spanclass="n">lDaemonLastDateTime</span><spanclass="o">=</span><spanclass="n">lIterationLastDateTime</span><spanclass="c1"># Set the new datetime for the new processor activity</span>
<spanclass="k">if</span><spanclass="n">lL</span><spanclass="p">:</span><spanclass="n">lL</span><spanclass="o">.</span><spanclass="n">exception</span><spanclass="p">(</span><spanclass="sa">f</span><spanclass="s2">"Scheduler: Exception has been catched in Scheduler module. Global error"</span><spanclass="p">)</span></div>
<spanclass="sa">f</span><spanclass="s2">"Scheduler:: Activity list is started in new thread. Parameters are not available to see."</span><spanclass="p">)</span><spanclass="c1"># Logging</span>
<spanclass="n">lIterationLastDateTime</span><spanclass="o">=</span><spanclass="n">datetime</span><spanclass="o">.</span><spanclass="n">datetime</span><spanclass="o">.</span><spanclass="n">now</span><spanclass="p">()</span><spanclass="c1"># Set the new datetime for the new processor activity</span>
<spanclass="sa">f</span><spanclass="s2">"Scheduler: Exception has been catched in Scheduler module when activity time item was initialising. ActivityTimeItem is </span><spanclass="si">{</span><spanclass="n">lItem</span><spanclass="si">}</span><spanclass="s2">"</span><spanclass="p">)</span>
<spanclass="n">lDaemonLastDateTime</span><spanclass="o">=</span><spanclass="n">lIterationLastDateTime</span><spanclass="c1"># Set the new datetime for the new processor activity</span>
<spanclass="c1"># Уснуть до следующего прогона</span>
<spanclass="k">if</span><spanclass="n">lL</span><spanclass="p">:</span><spanclass="n">lL</span><spanclass="o">.</span><spanclass="n">exception</span><spanclass="p">(</span><spanclass="sa">f</span><spanclass="s2">"Scheduler: Exception has been catched in Scheduler module. Global error"</span><spanclass="p">)</span>
<spanclass="c1"># Backward compatibility below to 1.2.0</span>
<spanclass="c1"># Backward compatibility below to 1.2.0</span>
<spanclass="n">gWindowTitleStr</span><spanclass="o">=</span><spanclass="s2">"PythonTerminator"</span><spanclass="c1"># Title of the phantom window</span>
<spanclass="n">gWindowDescriptionStr</span><spanclass="o">=</span><spanclass="s2">"pyOpenRPA library for safe turn off the program (by send the WM_CLOSE signal from task kill)"</span><spanclass="c1"># Description of the phantom window</span>
<spanclass="n">gLogger</span><spanclass="o">.</span><spanclass="n">info</span><spanclass="p">(</span><spanclass="sa">f</span><spanclass="s2">"StopSafe: Program has catch VM_CLOSE signal - do safe exit"</span><spanclass="p">)</span>
</pre></div>
</div>
</div>
<footer>
<hr/>
<divrole="contentinfo">
<p>
© Copyright 2021, Ivan Maslov.
</p>
</div>
Built with <ahref="https://www.sphinx-doc.org/">Sphinx</a> using a
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentActivityItemReturnExists">AgentActivityItemReturnExists() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentActivityItemReturnExists">AgentActivityItemReturnExists() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
</li>
</ul></td>
<tdstyle="width: 33%; vertical-align: top;"><ul>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentActivityItemReturnGet">AgentActivityItemReturnGet() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentActivityItemReturnGet">AgentActivityItemReturnGet() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
</li>
</ul></td>
<tdstyle="width: 33%; vertical-align: top;"><ul>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSCMD">AgentOSCMD() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSCMD">AgentOSCMD() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSFileBinaryDataBase64StrAppend">AgentOSFileBinaryDataBase64StrAppend() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSFileBinaryDataBase64StrAppend">AgentOSFileBinaryDataBase64StrAppend() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
@ -238,6 +242,8 @@
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSFileTextDataStrCreate">AgentOSFileTextDataStrCreate() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSFileTextDataStrCreate">AgentOSFileTextDataStrCreate() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSFileTextDataStrReceive">AgentOSFileTextDataStrReceive() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSFileTextDataStrReceive">AgentOSFileTextDataStrReceive() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSLogoff">AgentOSLogoff() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentProcessWOExeUpperUserListGet">AgentProcessWOExeUpperUserListGet() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentProcessWOExeUpperUserListGet">AgentProcessWOExeUpperUserListGet() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id20">ControlPanel (class in pyOpenRPA.Orchestrator.Managers.ControlPanel)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel">[1]</a>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id29">ControlPanel (class in pyOpenRPA.Orchestrator.Managers.ControlPanel)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel">[1]</a>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.Orchestrator">Orchestrator() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.Orchestrator">Orchestrator() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
</li>
@ -358,13 +380,17 @@
</li>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorRerunAsAdmin">OrchestratorRerunAsAdmin() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorRerunAsAdmin">OrchestratorRerunAsAdmin() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
</li>
</ul></td>
<tdstyle="width: 33%; vertical-align: top;"><ul>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorRestart">OrchestratorRestart() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorRestart">OrchestratorRestart() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorScheduleGet">OrchestratorScheduleGet() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
</ul></td>
<tdstyle="width: 33%; vertical-align: top;"><ul>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionRestore">OrchestratorSessionRestore() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionRestore">OrchestratorSessionRestore() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionSave">OrchestratorSessionSave() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionSave">OrchestratorSessionSave() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorThreadStart">OrchestratorThreadStart() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
</li>
<li><ahref="Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSCMD">OSCMD() (in module pyOpenRPA.Agent.__Agent__)</a>
<li><ahref="Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSCMD">OSCMD() (in module pyOpenRPA.Agent.__Agent__)</a>
@ -383,6 +409,8 @@
<li><ahref="Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSFileTextDataStrCreate">OSFileTextDataStrCreate() (in module pyOpenRPA.Agent.__Agent__)</a>
<li><ahref="Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSFileTextDataStrCreate">OSFileTextDataStrCreate() (in module pyOpenRPA.Agent.__Agent__)</a>
</li>
</li>
<li><ahref="Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSFileTextDataStrReceive">OSFileTextDataStrReceive() (in module pyOpenRPA.Agent.__Agent__)</a>
<li><ahref="Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSFileTextDataStrReceive">OSFileTextDataStrReceive() (in module pyOpenRPA.Agent.__Agent__)</a>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OSLogoff">OSLogoff() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OSRemotePCRestart">OSRemotePCRestart() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OSRemotePCRestart">OSRemotePCRestart() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
</li>
@ -396,13 +424,17 @@
</li>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessDefIntervalCall">ProcessDefIntervalCall() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessDefIntervalCall">ProcessDefIntervalCall() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
</li>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id13">ProcessGet() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessGet">[1]</a>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id20">ProcessGet() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessGet">[1]</a>
</li>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessIsStarted">ProcessIsStarted() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessIsStarted">ProcessIsStarted() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessListGet">ProcessListGet() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessListGet">ProcessListGet() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
</li>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id14">ProcessManual2Auto() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessManual2Auto">[1]</a>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id21">ProcessManual2Auto() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessManual2Auto">[1]</a>
</li>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id22">ProcessManualStopListClear() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessManualStopListClear">[1]</a>
</li>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id23">ProcessManualStopTriggerSet() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessManualStopTriggerSet">[1]</a>
</li>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemAppend">ProcessorActivityItemAppend() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemAppend">ProcessorActivityItemAppend() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
</li>
@ -415,20 +447,20 @@
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStart">ProcessStart() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStart">ProcessStart() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id16">ProcessStatusCheck() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStatusCheck">[1]</a>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id25">ProcessStatusCheck() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStatusCheck">[1]</a>
</li>
</li>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id17">ProcessStatusStrGet() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStatusStrGet">[1]</a>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id26">ProcessStatusStrGet() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStatusStrGet">[1]</a>
</li>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStop">ProcessStop() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStop">ProcessStop() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
</li>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id18">ProcessStopForce() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStopForce">[1]</a>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id27">ProcessStopForce() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStopForce">[1]</a>
</li>
</li>
</ul></td>
</ul></td>
<tdstyle="width: 33%; vertical-align: top;"><ul>
<tdstyle="width: 33%; vertical-align: top;"><ul>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id19">ProcessStopSafe() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStopSafe">[1]</a>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id28">ProcessStopSafe() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStopSafe">[1]</a>
</li>
</li>
<li><ahref="Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.ProcessWOExeUpperUserListGet">ProcessWOExeUpperUserListGet() (in module pyOpenRPA.Agent.__Agent__)</a>
<li><ahref="Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.ProcessWOExeUpperUserListGet">ProcessWOExeUpperUserListGet() (in module pyOpenRPA.Agent.__Agent__)</a>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.PythonStart">PythonStart() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.PythonStart">PythonStart() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
@ -514,13 +553,13 @@
</li>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.RDPTemplateCreate">RDPTemplateCreate() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.RDPTemplateCreate">RDPTemplateCreate() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.SchedulerActivityTimeAddWeekly">SchedulerActivityTimeAddWeekly() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.SchedulerActivityTimeAddWeekly">SchedulerActivityTimeAddWeekly() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.StorageRobotExists">StorageRobotExists() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.StorageRobotExists">StorageRobotExists() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
| Send signal via power shell to restart remote PC ATTENTION: Orchestrator user need to have restart right on the Remote machine to restart PC.
| Send signal via power shell to restart remote PC ATTENTION: Orchestrator user need to have restart right on the Remote machine to restart PC.
@ -228,6 +238,11 @@ Work with activity scheduling.
| Orchestrator restart
| Orchestrator restart
|
|
| `OrchestratorScheduleGet`()
| Get the schedule (schedule.readthedocs.io) from the Orchestrator
|
| `OrchestratorSessionRestore`([inGSettings])
| `OrchestratorSessionRestore`([inGSettings])
| Check _SessionLast_RDPList.json and _SessionLast_StorageDict.pickle in working directory. if exist - load into gsettings # _SessionLast_StorageDict.pickle (binary) _SessionLast_RDPList.json (encoding = “utf-8”) _SessionLast_StorageDict.pickle (binary).
| Check _SessionLast_RDPList.json and _SessionLast_StorageDict.pickle in working directory. if exist - load into gsettings # _SessionLast_StorageDict.pickle (binary) _SessionLast_RDPList.json (encoding = “utf-8”) _SessionLast_StorageDict.pickle (binary).
@ -238,6 +253,11 @@ Work with activity scheduling.
Return the process list only for the current user (where Agent is running) without .EXE in upper case. Can use in ActivityItem from Orchestrator to Agent
Return the process list only for the current user (where Agent is running) without .EXE in upper case. Can use in ActivityItem from Orchestrator to Agent
@ -1227,6 +1257,11 @@ Verify user credentials in windows. Return bool
| Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):
| Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):
|
| `ProcessManualStopListClear`(…)
| Clear the last start tries list.
|
| `ProcessManualStopTriggerSet`(…)
| Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):
|
|
| `ProcessStart`(inAgentHostNameStr, …[, …])
| `ProcessStart`(inAgentHostNameStr, …[, …])
@ -78,6 +88,13 @@ Process instance has the following statuses:
* 5_STARTED_MANUAL
* 5_STARTED_MANUAL
How to use StopSafe on the robot side
.. code-block:: python
> from pyOpenRPA.Tools import StopSafe
> StopSafe.Init(inLogger=None)
> StopSafe.IsSafeStop() # True - WM_CLOSE SIGNAL has come. taskkill /im someprocess.exe
**Methods:**
**Methods:**
| `Manual2Auto`()
| `Manual2Auto`()
@ -85,6 +102,26 @@ Process instance has the following statuses:
| Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):
| Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):
| Set ManualStopTrigger (MST) to switch to STOPPED MANUAL if specified count of start fails will be catched in specified time period
|
| `MuteWait`()
| Internal def.
|
| `RestartForce`([inIsManualBool])
| `RestartForce`([inIsManualBool])
| Manual/Auto restart force.
| Manual/Auto restart force.
@ -95,16 +132,21 @@ Process instance has the following statuses:
| Manual/Auto restart safe.
| Manual/Auto restart safe.
|
|
| `ScheduleWeekDay`()
| `ScheduleStatusCheckEverySeconds`([…])
| Some template def to work with schedule package.
| Run status check every interval in second you specify.
|
|
| `Start`([inIsManualBool])
| `Start`([inIsManualBool])
| Manual/Auto start.
| Manual/Auto start.
|
|
| `StartCheck`()
| Start program if auto stopped (0_STOPPED).
|
| `StatusChangeLog`()
| `StatusChangeLog`()
| Lof information about status change
| Lof information about status change
@ -135,11 +177,21 @@ Process instance has the following statuses:
| Manual/Auto stop force.
| Manual/Auto stop force.
|
|
| `StopForceCheck`()
| Stop force program if auto started (4_STARTED).
|
| `StopSafe`([inIsManualBool])
| `StopSafe`([inIsManualBool])
| Manual/Auto stop safe.
| Manual/Auto stop safe.
|
|
| `StopSafeCheck`()
| Stop safe program if auto started (4_STARTED).
|
#### Manual2Auto()
#### Manual2Auto()
Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):
Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):
@ -151,6 +203,55 @@ Remove Manual flag from process (if exists) - it will allow the schedule operati
#### ManualStopListClear()
Clear the last start tries list.
* **Returns**
None
#### ManualStopTriggerNewStart()
Log new start event. Check if it is applicable. Change status if ManualStop trigger criteria is applied
Run status check every interval in second you specify.
* **Parameters**
**inIntervalSecondsInt**– Interval in seconds. Default is 120
* **Returns**
* **Returns**
None
#### Start(inIsManualBool=True)
#### Start(inIsManualBool=True)
Manual/Auto start. Manual start will block scheduling execution. To return schedule execution use def Manual2Auto
Manual/Auto start. Manual start will block scheduling execution. To return schedule execution use def Manual2Auto.
Will not start if STOP SAFE is now and don’t start auto is stopped manual now
* **Parameters**
* **Parameters**
@ -208,6 +319,16 @@ Manual/Auto start. Manual start will block scheduling execution. To return sched
#### StartCheck()
Start program if auto stopped (0_STOPPED).
* **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
#### StatusChangeLog()
#### StatusChangeLog()
Lof information about status change
Lof information about status change
@ -233,7 +354,8 @@ Check process status and run it if auto stopped self.mStatusStr is “0_STOPPED
* **Returns**
* **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
#### StatusCheckStopForce()
#### StatusCheckStopForce()
@ -242,7 +364,8 @@ Check process status and auto stop force it if self.mStatusStr is 4_STARTED
* **Returns**
* **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
#### StatusCheckStopSafe()
#### StatusCheckStopSafe()
@ -255,7 +378,7 @@ Check process status and auto stop safe it if self.mStatusStr is 4_STARTED
#### StopForce(inIsManualBool=True)
#### StopForce(inIsManualBool=True)
Manual/Auto stop force. Force stop dont wait process termination - it just terminate process now.
Manual/Auto stop force. Force stop don’t wait process termination - it just terminate process now.
Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto
Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto
@ -271,6 +394,16 @@ Manual stop safe will block scheduling execution. To return schedule execution u
#### StopForceCheck()
Stop force program if auto started (4_STARTED).
* **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
#### StopSafe(inIsManualBool=True)
#### StopSafe(inIsManualBool=True)
Manual/Auto stop safe. Stop safe is the operation which send signal to process to terminate own work (send term signal to process). Managers.Process wait for the mStopSafeTimeoutSecFloat seconds. After that, if process is not terminated - self will StopForce it.
Manual/Auto stop safe. Stop safe is the operation which send signal to process to terminate own work (send term signal to process). Managers.Process wait for the mStopSafeTimeoutSecFloat seconds. After that, if process is not terminated - self will StopForce it.
Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto
Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto
@ -284,7 +417,18 @@ Manual stop safe will block scheduling execution. To return schedule execution u
* **Returns**
* **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
#### StopSafeCheck()
Stop safe program if auto started (4_STARTED).
* **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
* **inAgentHostNameStr** – Agent hostname in any case. Required to identify Process
* **inAgentUserNameStr** – Agent user name in any case. Required to identify Process
* **inProcessNameWOExeStr** – The process name without extension .exe (the key of the Process instance). Any case - will be processed to the upper case
Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):
* **Parameters**
* **inAgentHostNameStr** – Agent hostname in any case. Required to identify Process
* **inAgentUserNameStr** – Agent user name in any case. Required to identify Process
* **inProcessNameWOExeStr** – The process name without extension .exe (the key of the Process instance). Any case - will be processed to the upper case
Manual/Auto start. Manual start will block scheduling execution. To return schedule execution use def Manual2Auto
Manual/Auto start. Manual start will block scheduling execution. To return schedule execution use def Manual2Auto
@ -526,6 +722,16 @@ Manual stop safe will block scheduling execution. To return schedule execution u
| Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):
| Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):
|
| `ProcessManualStopListClear`(…)
| Clear the last start tries list.
|
| `ProcessManualStopTriggerSet`(…)
| Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):
|
|
| `ProcessStart`(inAgentHostNameStr, …[, …])
| `ProcessStart`(inAgentHostNameStr, …[, …])
@ -578,6 +784,13 @@ Process instance has the following statuses:
* 5_STARTED_MANUAL
* 5_STARTED_MANUAL
How to use StopSafe on the robot side
.. code-block:: python
> from pyOpenRPA.Tools import StopSafe
> StopSafe.Init(inLogger=None)
> StopSafe.IsSafeStop() # True - WM_CLOSE SIGNAL has come. taskkill /im someprocess.exe
**Methods:**
**Methods:**
| `Manual2Auto`()
| `Manual2Auto`()
@ -585,6 +798,26 @@ Process instance has the following statuses:
| Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):
| Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):
| Set ManualStopTrigger (MST) to switch to STOPPED MANUAL if specified count of start fails will be catched in specified time period
|
| `MuteWait`()
| Internal def.
|
| `RestartForce`([inIsManualBool])
| `RestartForce`([inIsManualBool])
| Manual/Auto restart force.
| Manual/Auto restart force.
@ -595,16 +828,21 @@ Process instance has the following statuses:
| Manual/Auto restart safe.
| Manual/Auto restart safe.
|
|
| `ScheduleWeekDay`()
| `ScheduleStatusCheckEverySeconds`([…])
| Some template def to work with schedule package.
| Run status check every interval in second you specify.
|
|
| `Start`([inIsManualBool])
| `Start`([inIsManualBool])
| Manual/Auto start.
| Manual/Auto start.
|
|
| `StartCheck`()
| Start program if auto stopped (0_STOPPED).
|
| `StatusChangeLog`()
| `StatusChangeLog`()
| Lof information about status change
| Lof information about status change
@ -635,11 +873,21 @@ Process instance has the following statuses:
| Manual/Auto stop force.
| Manual/Auto stop force.
|
|
| `StopForceCheck`()
| Stop force program if auto started (4_STARTED).
|
| `StopSafe`([inIsManualBool])
| `StopSafe`([inIsManualBool])
| Manual/Auto stop safe.
| Manual/Auto stop safe.
|
|
| `StopSafeCheck`()
| Stop safe program if auto started (4_STARTED).
|
#### Manual2Auto()
#### Manual2Auto()
Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):
Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):
@ -651,6 +899,55 @@ Remove Manual flag from process (if exists) - it will allow the schedule operati
#### ManualStopListClear()
Clear the last start tries list.
* **Returns**
None
#### ManualStopTriggerNewStart()
Log new start event. Check if it is applicable. Change status if ManualStop trigger criteria is applied
Run status check every interval in second you specify.
* **Parameters**
**inIntervalSecondsInt**– Interval in seconds. Default is 120
* **Returns**
* **Returns**
None
#### Start(inIsManualBool=True)
#### Start(inIsManualBool=True)
Manual/Auto start. Manual start will block scheduling execution. To return schedule execution use def Manual2Auto
Manual/Auto start. Manual start will block scheduling execution. To return schedule execution use def Manual2Auto.
Will not start if STOP SAFE is now and don’t start auto is stopped manual now
* **Parameters**
* **Parameters**
@ -708,6 +1015,16 @@ Manual/Auto start. Manual start will block scheduling execution. To return sched
#### StartCheck()
Start program if auto stopped (0_STOPPED).
* **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
#### StatusChangeLog()
#### StatusChangeLog()
Lof information about status change
Lof information about status change
@ -733,7 +1050,8 @@ Check process status and run it if auto stopped self.mStatusStr is “0_STOPPED
* **Returns**
* **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
#### StatusCheckStopForce()
#### StatusCheckStopForce()
@ -742,7 +1060,8 @@ Check process status and auto stop force it if self.mStatusStr is 4_STARTED
* **Returns**
* **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
#### StatusCheckStopSafe()
#### StatusCheckStopSafe()
@ -755,7 +1074,7 @@ Check process status and auto stop safe it if self.mStatusStr is 4_STARTED
#### StopForce(inIsManualBool=True)
#### StopForce(inIsManualBool=True)
Manual/Auto stop force. Force stop dont wait process termination - it just terminate process now.
Manual/Auto stop force. Force stop don’t wait process termination - it just terminate process now.
Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto
Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto
@ -771,6 +1090,16 @@ Manual stop safe will block scheduling execution. To return schedule execution u
#### StopForceCheck()
Stop force program if auto started (4_STARTED).
* **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
#### StopSafe(inIsManualBool=True)
#### StopSafe(inIsManualBool=True)
Manual/Auto stop safe. Stop safe is the operation which send signal to process to terminate own work (send term signal to process). Managers.Process wait for the mStopSafeTimeoutSecFloat seconds. After that, if process is not terminated - self will StopForce it.
Manual/Auto stop safe. Stop safe is the operation which send signal to process to terminate own work (send term signal to process). Managers.Process wait for the mStopSafeTimeoutSecFloat seconds. After that, if process is not terminated - self will StopForce it.
Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto
Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto
@ -784,7 +1113,18 @@ Manual stop safe will block scheduling execution. To return schedule execution u
* **Returns**
* **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
#### StopSafeCheck()
Stop safe program if auto started (4_STARTED).
* **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
* **inAgentHostNameStr** – Agent hostname in any case. Required to identify Process
* **inAgentUserNameStr** – Agent user name in any case. Required to identify Process
* **inProcessNameWOExeStr** – The process name without extension .exe (the key of the Process instance). Any case - will be processed to the upper case
Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):
* **Parameters**
* **inAgentHostNameStr** – Agent hostname in any case. Required to identify Process
* **inAgentUserNameStr** – Agent user name in any case. Required to identify Process
* **inProcessNameWOExeStr** – The process name without extension .exe (the key of the Process instance). Any case - will be processed to the upper case