このIIS、IIS6.0ではかなり高機能になっていてプロセスの監視機能やメモリ管理なんかもかなり充実している。
IIS5.0の場合、IIS6.0のようなプロセス監視機能がないため、特定のアプリケーションがメモリヒープを起こした場合に対応が難しい。
こういった場合には「IISRESET」コマンドが非常に役に立つ。
早速、テキストエディタを開き、「c:\iis_restart.bat」として保存する。
iisreset /RESTART /REBOOTONERROR /TIMEOUT:30 対象のホスト名
あとは、たとえば1時間おきにIISの再起動を行いたいのであれば、ATコマンドで以下のジョブを追加する。
C:\>at 0:00 /every:M,T,W,Th,F,S,Su "c:\iis_restart.bat"
C:\>at 1:00 /every:M,T,W,Th,F,S,Su "c:\iis_restart.bat"
C:\>at 2:00 /every:M,T,W,Th,F,S,Su "c:\iis_restart.bat"
C:\>at 3:00 /every:M,T,W,Th,F,S,Su "c:\iis_restart.bat"
C:\>at 4:00 /every:M,T,W,Th,F,S,Su "c:\iis_restart.bat"
C:\>at 5:00 /every:M,T,W,Th,F,S,Su "c:\iis_restart.bat"
C:\>at 6:00 /every:M,T,W,Th,F,S,Su "c:\iis_restart.bat"
C:\>at 7:00 /every:M,T,W,Th,F,S,Su "c:\iis_restart.bat"
C:\>at 8:00 /every:M,T,W,Th,F,S,Su "c:\iis_restart.bat"
C:\>at 9:00 /every:M,T,W,Th,F,S,Su "c:\iis_restart.bat"
C:\>at 10:00 /every:M,T,W,Th,F,S,Su "c:\iis_restart.bat"
C:\>at 11:00 /every:M,T,W,Th,F,S,Su "c:\iis_restart.bat"
C:\>at 12:00 /every:M,T,W,Th,F,S,Su "c:\iis_restart.bat"
C:\>at 13:00 /every:M,T,W,Th,F,S,Su "c:\iis_restart.bat"
C:\>at 14:00 /every:M,T,W,Th,F,S,Su "c:\iis_restart.bat"
C:\>at 15:00 /every:M,T,W,Th,F,S,Su "c:\iis_restart.bat"
C:\>at 16:00 /every:M,T,W,Th,F,S,Su "c:\iis_restart.bat"
C:\>at 17:00 /every:M,T,W,Th,F,S,Su "c:\iis_restart.bat"
C:\>at 18:00 /every:M,T,W,Th,F,S,Su "c:\iis_restart.bat"
C:\>at 19:00 /every:M,T,W,Th,F,S,Su "c:\iis_restart.bat"
C:\>at 20:00 /every:M,T,W,Th,F,S,Su "c:\iis_restart.bat"
C:\>at 21:00 /every:M,T,W,Th,F,S,Su "c:\iis_restart.bat"
C:\>at 22:00 /every:M,T,W,Th,F,S,Su "c:\iis_restart.bat"
C:\>at 23:00 /every:M,T,W,Th,F,S,Su "c:\iis_restart.bat"
コメントする