java - How to stop the application from within in Openshift -
i want able stop application inside every 3 days. want schedule method automatically stop application without intervention outside (like sitting on desktop etc).
so far, have these in mind:
runtime.getruntime().exec("rhc stop-app --app applicationname"); //this doesn't work. have tried
or
system.exit(0) // told not run command on openshift server
or
runtime.getruntime().exit(0) //i afraid run command
or
runtime.getruntime().halt(0) //i afraid run command
some of commands afraid use because told not run them on openshift server may stop whole vm. , stop applications hosted on vm. , me banned. banned.
edit: question not how stop application generally. question regarding how stop spring mvc wep application hosted on openshift server. , no answers donot work in link.
well, used runtime.getruntime().exit(0)
, stopped application. didn't ban or anything. , restarted application see if there issues. no issues. command do. thanks
edit: works openshift restarts application automatically. not answer. put answer here if find one. thanks
Comments
Post a Comment