Sign in to follow this  
Followers 0
Darktan

Broken Timer

1 post in this topic

I have a script that runs in the background of a server. It's supposed to go out and look for a marker file on another server and if it finds it, delete it and wait for a specified amount of time. The problem is it's not consistent. I ran it for 3 days with no problems. Now it seems like it's not running at all or it does it at weird hours. The only thing I did that might have effected it is the addition of the tray menu changes. Here's the sample code of the timer below. The $LOG and $DELAY variables come from reading an INI file. The $DELAY variable is normally '60'.

Any help would be appreciated. I'm just not seeing where the issue is.

Peace

CODE
$timer = TimerInit()

While 1

$msg = TrayGetMsg()

Select

Case $msg = 0

ContinueLoop

Case $msg = $iniitem

Run ("Notepad.exe Schedulemonitor.ini")

Case $msg = $Logitem

Run ("Notepad.exe " & $LOG)

Case $msg = $aboutitem

Msgbox(64,"About","JDE Scheduler Monitor program"& @LF & "Written by me" & @LF & @CRLF & "Version: "& $version)

Case $msg = $exititem

ExitLoop

EndSelect

If TimerDiff($timer) >= $DELAY*60000 Then

Search()

$timer = TimerInit()

EndIf

Sleep(30000) ;Sleep 30 seconds

WEnd

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0