473,778 Members | 1,886 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can Access detect when its midnight

Using Access2000

I have an application that is running 24/7 and I would like this application
to perform some routine housekeeping task at midnight.

What would be an efficient way of doing this; of detecting when midnight
arrives? (Without having a form timer check every minute or so to see if
midnight has arrived yet.)

Would a CallBack Funtion be useful?

Thanks

G.Gerard
Nov 13 '05 #1
9 1904
GGerard wrote:
Using Access2000

I have an application that is running 24/7 and I would like this application
to perform some routine housekeeping task at midnight.

What would be an efficient way of doing this; of detecting when midnight
arrives? (Without having a form timer check every minute or so to see if
midnight has arrived yet.)
When it intitiates the first time, see how long it takes to midnight and
adjust the timer interval to that length. Maybe flag that machine as
the one to execute the housekeeping.
Would a CallBack Funtion be useful?
Maybe schedule a machine to fire up at midnight and pass a /x (macro)
parameter on the command line that lets the app know it is to do the
cleanup or a user/password combo. See "Startup command-line options" in
help.
I'm not sure how a dumb computer can recognize when midnight arrives
without some sort of timer or scheduler.
Thanks

G.Gerard

Nov 13 '05 #2
On a form's timer event, ask if Now() is equal to midnight; if so, run your
code, if not, reset the timer to 1000.
Darryl Kerkeslager


"GGerard" <gg*****@nbnet. nb.ca> wrote in message
news:xk******** **************@ ursa-nb00s0.nbnet.nb .ca...
Using Access2000

I have an application that is running 24/7 and I would like this application to perform some routine housekeeping task at midnight.

What would be an efficient way of doing this; of detecting when midnight
arrives? (Without having a form timer check every minute or so to see if
midnight has arrived yet.)

Would a CallBack Funtion be useful?

Thanks

G.Gerard

Nov 13 '05 #3
Alternatively, use the IsWerewolf() function.
Darryl Kerkeslager

"GGerard" <gg*****@nbnet. nb.ca> wrote in message
news:xk******** **************@ ursa-nb00s0.nbnet.nb .ca...
Using Access2000

I have an application that is running 24/7 and I would like this application to perform some routine housekeeping task at midnight.

What would be an efficient way of doing this; of detecting when midnight
arrives? (Without having a form timer check every minute or so to see if
midnight has arrived yet.)

Would a CallBack Funtion be useful?

Thanks

G.Gerard

Nov 13 '05 #4
Oops. Didn't read the "without". Nevertheless, I don't see that as
inefficient, but, how about setting the on timer to 1000*60*60*24?

Darryl Kerkeslager
What would be an efficient way of doing this; of detecting when midnight
arrives? (Without having a form timer check every minute or so to see if
midnight has arrived yet.)

Nov 13 '05 #5
Darryl Kerkeslager wrote:
Alternatively, use the IsWerewolf() function.


Only works on full moon, good for two days a (lunar) month :-)

--

\\\\\\
\\ \\ Windows is searching
\ \ For your sig.
\ \ Please Wait.
\__\

Nov 13 '05 #6
You are correct in thinking that you do not want to waste all that
processing time by checking the time every second. Assuming that the
task does not need to run exactly at midnight, then why not check it
every 30 minutes or so? After you run the task, set a flag in a table
for the current date so you know it's done and you won't repeat it.
Hank Reed
Nov 13 '05 #7
My bad. I think Ken Getz had written some sort of function like,
IsWitchingHour( ), but I've lost my copy of the Access Developer's Spellbook.
Darryl Kerkeslager
Alternatively, use the IsWerewolf() function.


Only works on full moon, good for two days a (lunar) month :-)

--

Nov 13 '05 #8
GGerard,
Nope. We did this at Schwab for an app that had to log in to Oracle and
pick up some data that was ready after 4am. We could run our job any time
after 4am but had to be done processing by 7am when the client's staff
arrived. What we did is leave a machine running the app with a form timer
that sat idle until the scheduled start time for the job. The only
interface was a means to reschedule the job and an options form that let the
client enable or disable some of the steps in the job that was run. So,
form_timer is what worked for us.
We also noticed that running doevents in our loop meant that the machine was
fairly responsive otherwise and could be used off-hours as a spare machine
even though Access was idling away running our form_timer event.

"GGerard" <gg*****@nbnet. nb.ca> wrote in message
news:xk******** **************@ ursa-nb00s0.nbnet.nb .ca...
Using Access2000

I have an application that is running 24/7 and I would like this
application
to perform some routine housekeeping task at midnight.

What would be an efficient way of doing this; of detecting when midnight
arrives? (Without having a form timer check every minute or so to see if
midnight has arrived yet.)

Would a CallBack Funtion be useful?

Thanks

G.Gerard

Nov 13 '05 #9
Can you isolate the housekeeping chores into a separate application
and launch that application at midnight using the Windows Task
Scheduler?

On Wed, 29 Sep 2004 00:28:13 GMT, "GGerard" <gg*****@nbnet. nb.ca>
wrote:
Using Access2000

I have an application that is running 24/7 and I would like this application
to perform some routine housekeeping task at midnight.

What would be an efficient way of doing this; of detecting when midnight
arrives? (Without having a form timer check every minute or so to see if
midnight has arrived yet.)

Would a CallBack Funtion be useful?

Thanks

G.Gerard

*************** *******
ja************* *@telusTELUS.ne t
remove uppercase letters for true email
http://www.geocities.com/jacksonmacd/ for info on MS Access security
Nov 13 '05 #10

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

Similar topics

14
1882
by: Fabian | last post by:
function getImage(id,x,y) { if (mpdef == undefined) { // set to default image document.getElementById(id).src = terrdef; } else { document.getElementById(id).src = terrdef ]; } return; }
6
4753
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much appreciated. Thanks in advance
5
1905
by: Iain Miller | last post by:
Trying to get my head round building a DB to analyse phone bills. On the surface its fairly simple - duration in seconds x cost per minute/60. The problem arises with working out what time of day a call was made because calls are charged at different rates at different times. The problem with this is working out when a call crosses time bands & part of it needs to be rated at one rate & part at another & then the two halves added...
3
2173
by: Iain Miller | last post by:
Can anybody help me with some Access 2000 code? I don't do a lot of coding in Access & so every time I come back to do something I pretty much have to relearn the syntax from scratch so this is taking me hours. As with most occasional programmers its the commas, colons, inverted commas, square brackets etc etc that cause the problem! (Not to mention the nuances of using Do While, Do until, Case statements If statements, IIF etc etc...)...
0
3292
by: bettervssremoting | last post by:
To view the full article, please visit http://www.BetterVssRemoting.com Better VSS Remote Access Tool including SourceOffSite, SourceAnyWhere and VSS Remoting This article makes a detailed comparison among SourceAnyWhere, SourceOffSite, VSS Remoting and possible others.
2
1734
by: Meaney | last post by:
Hi, I'm relatively new when using Access so bear with me. I have an Excel file with 4 spreadsheets, each with multiple columns Tbl.Schools SchoolName SchoolCity SchoolPop
3
3134
by: keithsimpson3973 | last post by:
I am trying to find a way to do the following I need to make a report (or datagrid, not sure which would be better) that can be printed. The format of the report is as follows: The first column on the print out is 24 hours in half hour increments (starts with midnight 00:00 and ends the next midnight 23:30). The rest of the columns on the report are fields from access 2003 database as well. When a schedule for an event is entered into...
2
1697
by: chipbasschao | last post by:
Hey Guyz.... Have recently had to change Phone companies (old one stopped trading) in the UK and was given an advanced date (1st February) and two weeks warning. The old company had a small Box between the Phone line and my system (to detect calls) and to be safe I remove this early on the 31st January (before I reverted back to my old Phone company) to make sure everything worked okay....it did. On the stroke of Midnight I checked my system...
8
2429
by: Trev | last post by:
Hi Can anyone point me in the right direction here, I would like to open a table in access 2003 by date. I have an asp web page which needs to read data from a table with each days today's date (which ever day that is) then a new table is created with today's date. Example: I have a table called 17-may-2007 my ASP page reads this table for 24hours then tomorrow (12:00 midnight 18th) I will have a new table called 18-may-2007 and the...
0
9628
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9464
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10292
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10122
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9923
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8954
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6722
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5368
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2860
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.