wait or pause in script

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jurgen Oerlemans

    wait or pause in script

    Hello, I am kind of new into VB and trying to make a program that checks how
    old a log file is and if it is too old --> send a sms to me so I can can
    take action.
    Problem is not too difficult I think:
    I made a a script to chck how old (in minutes) the logfile is. After that I
    want to wait 15 minutes before I check again. So how do I perform that
    check? It is always 15 minutes, so that can be hardcoded. ot too diffcult I
    think...

    Any help would be much appreciated,

    Jurgen Oerlemans


  • CajunCoiler \(http://www.cajuncoiler.tk\)

    #2
    Re: wait or pause in script

    You should be able to use a standard timer object, it just needs a little
    boost
    with a sub, and a couple of variables to make it extend into minutes. Here
    is
    an example that should work in your situation...

    ' Add Timer1 to form
    ' .Interval=60000 (this can be set to 1000 to count seconds instead)
    ' .Enabled=False
    'Add public variables
    ' Public CurrentMinute As Single
    ' Public TimeLimit As Single
    '
    ' Activate timer to begin counting off minutes
    '
    Private Sub Timer1_Timer()
    CurrentMinute=C urrentMinute+1
    If CurrentMinute=T imeLimit Then
    Timer1.Enabled= False
    MsgBox "Time's Up": 'put code to execute other code, here
    End If
    End Sub
    '
    ' Initialize variables
    '
    Private Sub Form_Load()
    CurrentMinute = 0
    TimeLimit=15
    End Sub

    "Jurgen Oerlemans" <jukkie_at_nosp amwanadoo.nl> wrote in message
    news:3fe5cd54$0 $120$3b62cedd@n ews.wanadoo.nl. ..[color=blue]
    > Hello, I am kind of new into VB and trying to make a program that checks[/color]
    how[color=blue]
    > old a log file is and if it is too old --> send a sms to me so I can can
    > take action.
    > Problem is not too difficult I think:
    > I made a a script to chck how old (in minutes) the logfile is. After that[/color]
    I[color=blue]
    > want to wait 15 minutes before I check again. So how do I perform that
    > check? It is always 15 minutes, so that can be hardcoded. ot too diffcult[/color]
    I[color=blue]
    > think...[/color]


    Comment

    Working...