473,394 Members | 1,956 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,394 software developers and data experts.

Code running on a particular time

Hi
I need to run a code on a particular period of time, for which i have been asked not to use a scheduler. I have an idea of using a timer that will call my cord.But i am not clear about the steps i need to follow in developing a timer script
Can anyone guide me in developing this code.
i will be thankful to whatever help being offered too.
thanks
Mano
Jan 1 '08 #1
2 926
kadghar
1,295 Expert 1GB
Hi
I need to run a code on a particular period of time, for which i have been asked not to use a scheduler. I have an idea of using a timer that will call my cord.But i am not clear about the steps i need to follow in developing a timer script
Can anyone guide me in developing this code.
i will be thankful to whatever help being offered too.
thanks
Mano
Im not sure im getting what you need, but yes, you can leave a timer running with something like:
Expand|Select|Wrap|Line Numbers
  1. if time >= StartingTime and boo1 = false then
  2.     call Procedure1  ' Or any sub you want to run
  3.     boo1=true
  4. elseif time >= FinishTime then 
  5.     end
  6. end if
Make sure you define Boo1 as a boolean outside the timer, so once the code runs for the first time, you wont run it again and again and again.Im not sure if "time" works for every version of VB, if it doesnt works, find out how to call the system's clock.

HTH
Jan 2 '08 #2
Im not sure im getting what you need, but yes, you can leave a timer running with something like:
Expand|Select|Wrap|Line Numbers
  1. if time >= StartingTime and boo1 = false then
  2.     call Procedure1  ' Or any sub you want to run
  3.     boo1=true
  4. elseif time >= FinishTime then 
  5.     end
  6. end if
Make sure you define Boo1 as a boolean outside the timer, so once the code runs for the first time, you wont run it again and again and again.Im not sure if "time" works for every version of VB, if it doesnt works, find out how to call the system's clock.

HTH

thanks for ur help sorry i could not reply immediately as i have been assigned with another task... am trying out the solution too... thankful to the help that was rendered
will get backl again if i encounter any problem
thanks again

mano
Jan 6 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Mario T. Lanza | last post by:
Greetings, I don't know about you guys but on many occasions I've asked myself whether or not someone else has solved a particular programming issue -- whether or not they developed a clever...
29
by: pb648174 | last post by:
I have a very long transaction that runs on the same database that other users need to use for existing data. I don't care if they see data from the transaction before it is done and am only using...
28
by: MLH | last post by:
Would like to roll out something in Access 2.0 to read MAC address on 16-bit systems. Have resolved on 32-bit platforms but still need help with Access Basic code to do it from within Access 2.0.
3
by: SSG | last post by:
Hi All! I know how to calculate the running time of a particular routine, but i want to know how to reduce the running time in a program........... can anyone knows help me........ also...
5
by: Blasting Cap | last post by:
I have a VB6 program that runs as an app, that I want to both convert it to vb.net, and run it as a service on the server. I have been able to create the service, and what I did was to open the...
3
by: Jamie Risk | last post by:
I'm attempting to improve some serially executing code (that uses the SerialPort class) bogging Windows down when it runs. To do the 'antibogging' I'm following the example from MSDN...
2
by: ApexData | last post by:
Hi I am using the Shortcut Menu Bar property of a control to specify a Custom popupmenu that displays when the right-click of the mouse is used. Can I place some kind of command in this...
27
by: George2 | last post by:
Hello everyone, Should I delete memory pointed by pointer a if there is bad_alloc when allocating memory in memory pointed by pointer b? I am not sure whether there will be memory leak if I do...
27
by: Dave | last post by:
I'm having a hard time tying to build gcc 4.3.1 on Solaris using the GNU compilers. I then decided to try to use Sun's compiler. The Sun Studio 12 compiler reports the following code, which is in...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.