Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

I have a windows server 2003 that runs low on memory and to solve the problem I restart it. So to help with this I want to set up a scheduled task that restarts the server every night. Any tips on how I can create such a scheduled task?

And the follow on task from this I am looking for some software, something open source that wouldn't cost that would monitor the server, send me an email alert or the like when its down?

share|improve this question
up vote 0 down vote accepted

Simply create a Batch file with the correct commands to restart the server and then use the Task Scheduler to run the task at the correct time.

For reference purposes, here are the commands that you can use in your batch file to restart Windows Server from the Command Line.

Good luck!

share|improve this answer

I'm curious as to what the program is which is causing the memory leak. Perhaps it would be better to restart those specific services rather than the entire machine. I had this same issue with an old BES server and we ended up created a script to restart the BlackBerry and SQL services every night outside business hours which worked quite well.

If you insist on rebooting the entire machine however...

Make a simple batch script and run it through the scheduler, ensure it is set to run even if nobody is logged in:

shutdown -r -f

For open source monitoring, it doesn't get much better than Nagios.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .