viewpoint-particle

Author Topic: Exit does not exit  (Read 109 times)

erezpaz

  • Jr. Member
  • **
  • Posts: 70
Exit does not exit
« on: October 17, 2021, 09:31:26 am »
Hi

I have a big automation script that run in schedule. If my script detects that the process is up it wont start.
In some cases that I cannot restore, script get to the end with an "Exit" command but the process stay up. Next schedule run wont start since previous process is stuck.
Is it something that you heard of and can be solve?
I debug my script and there are no bugs. Also I got detailed log so all process run fine, It just sometimes does not exit.

Thanks

cssyphus

  • Jr. Member
  • **
  • Posts: 55
  • Let's go Brandon
Re: Exit does not exit
« Reply #1 on: October 18, 2021, 07:24:38 am »
Not to nitpick, but we must understand in order to assist.

What do you mean by "the process"? 

What does this mean: "If my script detects that the process is up it wont start"

And what does this mean: "but the process stay up"?  What process?

Is your script compiled?

When you debug your script, do you use DebugTrace() ?  If so, do you have any user-defined functions or subroutines? If so, do you use DebugTrace(22) inside of them (to continue the debugger inside the function/subroutine)?

Are you able to post a DebugTrace log file?
Is this a pandemic... or an IQ test? newz.icu

td

  • Tech Support
  • *****
  • Posts: 3952
    • WinBatch
Re: Exit does not exit
« Reply #2 on: October 18, 2021, 07:32:58 am »
Hi

I have a big automation script that run in schedule. If my script detects that the process is up it wont start.
In some cases that I cannot restore, script get to the end with an "Exit" command but the process stay up. Next schedule run wont start since previous process is stuck.
Is it something that you heard of and can be solve?
I debug my script and there are no bugs. Also I got detailed log so all process run fine, It just sometimes does not exit.

Thanks

There is too much information missing to provide much in the way of suggestions. For example, you state that you run the script on a "schedule". Does that mean that you are using the Windows Task Scheduler? If so, you can configure Task Schedular to terminate a task after a specified amount of time. Are you using DebugTrace to generate your logs or are you talking about the Task Scheduler history logs?

And yes the Windows Task Scheduler can be a bit flaky and not allow tasks to terminate themselves from time to time. Otherwise, not properly closing down external COM Automation objects or a child process can cause the OS to block a process terminating itself.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade