Solved

reboot script with email

Posted on 2011-03-18
2
328 Views
Last Modified: 2012-05-11
Can someone please help me with a script which i can set as an automated task which will reboot a server, but send and Email warning 15 minutes prior to reboot?
0
Comment
Question by:alexr54
2 Comments
 
LVL 45

Accepted Solution

by:
Craig Beck earned 500 total points
ID: 35167454
Download a command-line SMTP mailer such as BLAT.  Then create the following BAT file...

BLAT -server <mailserverip> -i <senderaddress> -t <toaddress> -s "Server Restarting..." -body "The server <servername> will restart in 15 minutes!"
shutdown -r -t 900

Obviously change the <mailserverip> to the IP address of a SMTP server on your network, and set the <senderaddress> and <toaddress> to the relevant values.

Schedule that BAT file to run and it should email then restart the server 15 minutes later.
0
 
LVL 2

Author Comment

by:alexr54
ID: 35168073
Thanks. I think that will work, i'll try it out.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article will cover setting up redundant ISPs for outbound connectivity on an ASA 5510 (although the same should work on the 5520s and up as well).  It’s important to note that this covers outbound connectivity only.  The ASA does not have built…
From Cisco ASA version 8.3, the Network Address Translation (NAT) configuration has been completely redesigned and it may be helpful to have the syntax configuration for both at a glance. You may as well want to read official Cisco published AS…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now