Not going to happen. The reason is simple - there is no uniform way of starting and stopping Tomcat, no uniform syntax for the scripts to do this and no uniform way of scheduling jobs.
And you should know that even if such a script would be possible, we are NotACodeMill and wouldn't just provide it like that.
i've create batch file which run on windows and sh file which run on linux. i did not ask you to provide the full coding. but, ask you to show me the way on how to do it.
Tim Moores
Rancher
Joined: Sep 21, 2011
Posts: 2407
posted
0
This could involve a cron job that runs every 5 minutes and checks whether the Tomcat process is still alive, and restarts it if it isn't.
Edit: just saw that the title is actually somewhat different than the question behind it. My answer would thus be simplified to: This could involve a cron job (or a Windows Scheduler task if running on Windows).
gana rajan wrote:i've create batch file which run on windows and sh file which run on linux. i did not ask you to provide the full coding. but, ask you to show me the way on how to do it.
And you've shown yourself there is no OS independent way, as you've already had to create two separate batch files.