Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Ok. So this is my plan. I'll have a micro instance run a batch file to start the server at 6AM and stop the server at 10PM. The micro instance will be on all the time so I could leverage the webserver on that machine. I would like to inform the user that the service requested isn't available outside of those times.

Can't find the answer to this because most servers don't turn off/on daily.

How I set up the script to run on the micro server

Thanks for your help in advance.

share|improve this question
You can use the Amazon EC2 API to boot/shutdown servers – AliGibbs Sep 15 '11 at 11:54

You the AWS Load balancer (Details here: and put both servers in the pool, when the largest instance shuts down, all load will hit the micro and hence show the page you want.

share|improve this answer

This will require that your DNS host supports dynamic updates to the DNS server via a script so that you can change the DNS to point to the new server before you shutdown the other instance.

I'm not sure if Amazon supports active/passive load balancing but if they do you could use their load balancing service to do that with the bigger instance as the primary. This may be more expensive than keeping the other instance online through the night.

share|improve this answer

What about directing users to the micro server webserver which runs a redirect, but only after a successful ping, to the larger server? In the event of an unsuccessful ping the user would be sent to an error screen on the micro box.

No idea how to set this up.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.