Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

2 Answers

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.

http://blogs.techrepublic.com.com/datacenter/?p=245

Good luck!

share|improve this answer
add comment

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
add comment

Your Answer

 
discard

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.