# Scheduled run fails

**URL:** https://www.finalbuilder.com/forums/t/scheduled-run-fails/7366
**Category:** Discussion
**Tags:** finalbuilder
**Created:** [June 15, 2023, 4:11am UTC](https://www.finalbuilder.com/forums/t/scheduled-run-fails/7366 "2023-06-15T04:11:55Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![KLund](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/klund/32/939_2.png) [@KLund](https://www.finalbuilder.com/forums/u/KLund)
#### Post date: [June 15, 2023, 4:11am UTC](https://www.finalbuilder.com/forums/t/scheduled-run-fails/7366/1 "2023-06-15T04:11:56Z")

</div>

I have a strange problem in FinalBuilder 8.0.0.3237 that I don’t understand.  
There is a batfile that is executed 6:00 every morning.

```auto
taskkill /IM "FinalBuilder8.exe" /F
taskkill /IM "bds.exe" /F
taskkill /IM "InitializeSystem.exe" /F
taskkill /IM "TestAttracs.exe" /F
del *.fb8lck
"C:\Program Files (x86)\FinalBuilder 8\FBCMD.EXE" -cf "F:\Attracs\AttracsBuildXE.fbp8"

```

Sometimes Delphi, FinalBuilder GUI etc is left from previous day. So those processes was killed before start. Lock-files deleted etc. And it worked fine. But now something changed.

 ![image](https://www.finalbuilder.com/forums/uploads/default/original/2X/a/ad35d41796f1a8183da67d8d4a6a42dc02b87149.png)

So endtime is 0. Runtime seems to have some kind of overflow.

 ![image](https://www.finalbuilder.com/forums/uploads/default/original/2X/f/f6b85dc4427ecc5f9f2e2944d259954a84884aed.png)  
The history now show full path instead of just name of log-file.

What can I do to solve this ?

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [June 15, 2023, 4:49am UTC](https://www.finalbuilder.com/forums/t/scheduled-run-fails/7366/2 "2023-06-15T04:49:07Z")

</div>

> [@KLund](#):
>
> Sometimes Delphi, FinalBuilder GUI etc is left from previous day. So those processes was killed before start. Lock-files deleted etc. And it worked fine. But now something changed.

If you kill FinalBuilder while it has a project open, you risk corrupting the log file (it’s a database). Not sure why the log file entries show the full path, will need to look into that. The runtime overflow will be from FinalBuilder being killed and the end time not being written to the log file.

I have to question why you are killing FinalBuilder? Are actions that you run hanging? If so then you should use the timeout feature on the actions Runtime tab, Timing Options (available on most actions that execute processes).

Is FinalBuilder running as an automated task each day? If that is the case then you should be running FBCMD.exe rather than the IDE. The Tash Scheduler wizard in FinalBuilder has options to have it close other instances of FinalBuilder when running a scheduled task - this should close the other instances cleanly.

---

<div class="post-metadata">

### Author: ![KLund](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/klund/32/939_2.png) [@KLund](https://www.finalbuilder.com/forums/u/KLund)
#### Post date: [June 15, 2023, 9:41am UTC](https://www.finalbuilder.com/forums/t/scheduled-run-fails/7366/3 "2023-06-15T09:41:28Z")

</div>

The issue is that we both use Finalbuilder IDE and FBCMD.EXE.  
So what can happen is that someone login to buildmachine and do a manual build in IDE.  
Then forgot to close IDE.  
Next morning a scheduled build with FBCMD.EXE. That will fail if the script is opened in IDE.

But now found [IDE Command Line Interface - FinalBuilder 8 - VSoft Technologies Documentation Wiki](https://wiki.finalbuilder.com/display/FB8/IDE+Command+Line+Interface)  
So it seems to be possible to close IDE a nice way 🙂

---

<div class="post-metadata">

### Author: ![KLund](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/klund/32/939_2.png) [@KLund](https://www.finalbuilder.com/forums/u/KLund)
#### Post date: [June 15, 2023, 1:19pm UTC](https://www.finalbuilder.com/forums/t/scheduled-run-fails/7366/4 "2023-06-15T13:19:10Z")

</div>

I forgot that I usually login as another user than the one that do automatic builds.  
It was a permission problem to github…
