Sign in to follow this  
Followers 0
Kammamuri

Running a program non stop over night

10 posts in this topic

HI again!

I'm running my autoit program (in truth 2 programs, if one stops/gets an error gets launched again by the other) on my laptop, a Sony Vaio FW. The programs work fine during the day but for some reason at night the computer goes nuts. Yesterday it was windows update which was scheduled for 3 am and for some reason it went to sleep after that, so the program stopped at 3 am and in the morning i found the pc sleeping. So i turned windows update off.

This morning the pc was still working but the screen was frozen on a page of about 3 am! (the last verified activity, from a txt file which gets modified by the program, is at 2:52 am) so i guess something happened again at about 3 am. when i managed to get  the screen refreshed i saw the program was still running (but had done nothing from 3am up to 7 am). Ah and the ErrorLog (a txt file that saves the errrors my main program encounters) was empty!

Any idea what might be the problem??

Also, I've noticed that IExplorer (the program interacts with it) becomes very slow after it has run for maybe an hour, while GoogleCrome and Firefox don't get this lag issue. I've even thought  to make the program relaunch IE periodically :( .. ideas to fix this?

Thanks in advance!

Share this post


Link to post
Share on other sites



if the program runs during daytime, i doubt you'll find it is the cause of your troubles.

how i would proceed:

1) check what Windows Event Log has to say.

2) apply some cleanup methods to your pc, like CCleaner.

Share this post


Link to post
Share on other sites

It's very hard if not impossible to help without having seen your code!


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Kammamuri,

My crystal ball is being repolished at the moment, thus it would help if you posted the scripts so we can look at them. We might then be able to come up with some sensible suggestions - at the moment I am tending towards the idea of your cat pressing the wrong key overnight. ;)

M23

P.S. When you post code please use Code tags - see here how to do it. - then you get a small scrolling codebox and syntax colouring. ;)

3 people like this

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

i second Melba23's idea about the cat. ;)

hey, i witnessed it once myself - the cat actually posted "neiu" on facebook! i guess the NSA are on our tracks now.

Share this post


Link to post
Share on other sites

Where can i find the "Windows event log"? searching that name in the pc gives only a bunch of txt files.

unfortunately no cat (or dog) is involved :( .. I'll try to clean the pc and to run the program on another machine

the parent program is:

HotKeySet("{ESC}", "Terminate")

Local $line

Local $ErrorLog = FileOpen("ErrorLog.txt",2)
FileClose($ErrorLog)

While 1

   If ProcessExists("TheBeast v0.75.exe") = 0 Then
      If ProcessExists("iexplore.exe") Then ProcessClose("iexplore.exe")
      Local $foo = Run('C:\Users\....\TheBeast v0.83.exe /ErrorStdOut', "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
   EndIf

   While 1
      $line = StdoutRead($foo)
      If @error Then ExitLoop
      Local $ErrorLog = FileOpen("ErrorLog.txt",1)
      FileWrite($ErrorLog, $line)
      FileClose($ErrorLog)
   WEnd

   Sleep(200)
WEnd

;Terminate
Func Terminate()
   Exit 0
EndFunc

the child one now is over 3k lines long and i can't post it here

basically what it does is:

-browse to a website

-refreshes some information that it has about the website

-then checks the time every second (since it uses the time of the website it has to do a _iebodyreadhtml and some stringregexp every second)

-if the time is right it does some actions, mainly _ieaction($oIE, "click"), some getobjects functions and formobjectsetvalue

i don't think there is nothing wrong here, and even if there was something it would just crash and get launched again

also, usually i use the IE window as "visible" so that i can see what the program is doing, but i can put it to "invisible" easily

Share this post


Link to post
Share on other sites

Run "eventvwr".


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Can you please tell us what "TheBeast v0.75.exe" is?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

ops didn't change the name of the program there!! well, that might be a problem! :D .. it's just  the name of the child program

edit: still the child program didn't crash so that line (with the wrong name) should not have been run

Edited by Kammamuri

Share this post


Link to post
Share on other sites

Kammamuri,

 

the child one now is over 3k lines long and i can't post it here

That and the use of an executable called "TheBeast" (which makes for some interesting Googling) are not giving me a warm fuzzy feeling. You have already been pointed to the Forum rules - are you sure this is legal? :huh:

And I have now seen your response to water - it seems it is not. Thread closed. :naughty:

That is 2 strikes - do NOT go for a third. ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0