473,405 Members | 2,154 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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
Jul 17 '05 #1
1 13909
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=CurrentMinute+1
If CurrentMinute=TimeLimit 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_nospamwanadoo.nl> wrote in message
news:3f*********************@news.wanadoo.nl...
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...

Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Scotter | last post by:
Hi - I have an app that I want to send out an email to each user in our member list giving them their username & pw, but I don't want to overwhelm my mail server since there are over 1000 users...
10
by: Jurgen Oerlemans | last post by:
I have a code where I perform several actions on files. Between these actions I want to wait for 1 second. Or 2 seconds. How can I easily do this without using a timer? Jurgen
4
by: tmb | last post by:
I want to do a slide show with a script something like http://www.abiglime.com/webmaster/articles/jscript/021298.htm My Question: Will the client wait on all pic's in the slice show to be...
7
by: arajunk | last post by:
I was looking around for some code for a special purpose and found this. Seems it should print "here we go" , pause 5 seconds, print "now we are back". Instead, it pauses 5 seconds before...
4
by: John | last post by:
I have code that opens and prints a report using the Adobe PDF printer driver. The problem is that Access VB executes the next step in code before the PDF "Printer" is done "printing". Since the...
15
by: Snuyt | last post by:
Hello, I want the program to wait a few seconds between executing code. It should look something like this: public sub xx() ...code... wait(2) 'wait 2 seconds ...code...
18
by: Coder | last post by:
Howdy everybody! How do I do the following... while (myVary != true){}; Obviously I do not want to use 100% of the processor to stay in this infinite loop till myVar == true. But wait do I...
4
by: SheldonMopes | last post by:
Is there a way to force Access to pause execution for a specified period of time ? I would like a command button on a form to run it's code when clicked and then pause for 2 seconds before allowing...
5
harshadd
by: harshadd | last post by:
How do i make an execution of program wait for n seconds? where n could be any Integer.. is there Sleep or pause or wait like command in VB6?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.