93 minutes ago: OK, I think I got the pesky Javascript error fixed. If you still see any popup error messages let me know. Thanks.  Dismiss
 
Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > Courses > Access > Templates > WatchDog Template
Back to Access WatchDog Template    Comments List
Force Reboot at 3 am Upload Images   Link   Email  
Eduardo Benaim 
8 months ago
You mentioned you have code to REBOOT your Email server automatically every evening around 3 am. To clean memory etc.

I also have a Dedicated computer that would like to REBOOT daily at 3 am.

I have a timer event that runs every 3 sec. And want to insert the code there. I Dont want to miss and I dont want to do multiple reboots. Only one reboot around that time.

Can you share this code or put it in the Vault please?

Thanks.
Scott Axton
8 months ago

I have a Nightly.bat file that I saved to my computer.
Literally one line:
   shutdown /r /t 120

You can see all the options for shutdown by opening a Command Prompt and type:
  shutdown /?

  /r         Full shutdown and restart the computer.
  /t xxx     Set the time-out period before shutdown to xxx seconds.
               The valid range is 0-315360000 (10 years), with a default of 30.
               If the timeout period is greater than 0, the /f parameter is
               implied.

In your Windows button type Task Scheduler.
Set up a new task for the time you want.  Put in the name of your .bat file.
I don't automatically start up Access but I'm sure you could add something into the Start Up folder.
Again Windows > Startup Apps
Scott Axton
8 months ago
BTW in order for the .bat file to be executed it has to be in one of the Path folders or you have to specify the full path in the T Scheduler.
Richard Rost
8 months ago
I prefer to simply restart Access instead of actually rebooting the computer, because if you reboot the computer you have to enable auto-logon (which makes the computer unsecure). Restarting Access doesn't require that. To restart Access all I do is shell out to another Access database which waits 5 seconds and then restarts the original database.
Kevin Yip
8 months ago
Servers in general aren't meant to be rebooted regularly.  They should remain on for days, months, etc.  Computer parts can be replaced inside the server while the server is *still on* and running (called hot-swappable parts).  The only times they need to shut down and reboot are for maintenance.  I had a server like that in my old job and it cost $5000, and it ran for months at a time.  If there were parts that need to be replaced, the server could email me remotely.  I could open up a web browser and check server status remotely.  This was mid-2000s technology, and I'm sure today's tech is even more advanced.  The point is servers aren't meant to be reboot daily.  If your backend database is mission-critical enough for you, it needs to be stored in a server like this.
Eduardo Benaim
8 months ago
Kevin and Richard: Thank you for your Input.  The computer in question is NOT A SERVER.  I agree about not rebooting Servers. Richard, what I was looking for is to add an option to the WatchDog that would allow to set up a Computer reboot time. This computer has no password and when it is rebooted it starts the Program in question with a clean Slate. This is what I came up with. Only thing missing is an on/off which I will add soon
Eduardo Benaim
8 months ago

Eduardo Benaim
8 months ago
This is the Code I came up with:
Me.myNow = Time()
Me.Dif = Abs(DateDiff("s", Me.myNow, Me.myAlarm))
    If Me.Dif < 10 Then
        DeleteCalls
        Sleep 5000
        RestartPC  
    Else
            Exit Sub  
    End If


DeleeCalls and StartPC are two Subroutines
Eduardo Benaim
8 months ago
Me.myAlarm is the ReBoot Time
Eduardo Benaim
8 months ago

Eduardo Benaim
8 months ago
Re-Boot at now has a check box by default is true. but you can let the system run for weeks if you want.  
Richard I believe this would be a nice addition to the watchDog Proram ( I love it)
Richard Rost
8 months ago
I can see how a forced reboot at a particular time would be handy, but you need to also make sure that your database knows to PAUSE whatever it's doing right before that too. You wouldn't want to shutdown while something critical is happening. But yes, thanks for sharing!
Kevin Yip
8 months ago
Hi Eduardo, any computer that is mission-critical in your business and serves data in your network is essentially like a server, and needs to be robust enough to not have to restart all the time because that would be disruptive to your business.  Your PC is obviously critical to you, otherwise you could just wait till the next morning to reboot it instead of 3am.
Eduardo Benaim
8 months ago
Richard and Kevin:  

Thank you for the input.  All this PC does is to take incoming phone calls that come in from 9am-5pm (Business hours).
In real time it Identifies the caller and it opens the CustomerF form with all the customers info so an operator may greet him.
I chose 3 am but it can be any time after business hours (Say 8am).  
The critical time is 9am-5pm.
For that I have the WatchDog Running  in case it locks up or there is an internet shortage. (Thank you Richard).
I want it to run unattended. That is why.
Thank you for your recommendations.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access WatchDog Template.
 

 
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2024 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 2/22/2024 7:42:57 PM. PLT: 0s