java - How to run a Common Apache Daemon Window Service on interval of 2 hours automatically -



java - How to run a Common Apache Daemon Window Service on interval of 2 hours automatically -

i have installed windows service through common apache daemon service . installation batch file's code

@echo off setlocal rem service names (make sure not clash existing service) rem set service_jvm=myservice set service_java=myservice rem location set mypath=c:\myservice\src\classes rem location of prunsrv set path_prunsrv=c:\myservice\src\bin set pr_logpath=c:\myservice\logs rem location of jarfile set path_jar=%mypath% rem allow prunsrv overridden if "%prunsrv%" == "" set prunsrv=%path_prunsrv%\myservice.exe rem install 2 services echo installing %service_jvm% %prunsrv% //ds//%service_jvm% %prunsrv% //is//%service_jvm% echo setting parameters %service_java% %prunsrv% //us//%service_jvm% --startup=auto --jvm=auto --stdoutput auto --stderror auto ^ --classpath=%path_jar%\myservice.jar ^ --startmode=jvm --startclass=webmuch.myservice --startmethod=main --startparams=start ^ --stopmode=jvm --stopclass=webmuch.myservice --stopmethod=main --stopparams=stop echo installation of %service_java% finish echo installing %service_java% %prunsrv% //ds//%service_java% %prunsrv% //is//%service_java% echo setting parameters %service_java% %prunsrv% //us//%service_java% --startup=auto --jvm=auto --stdoutput auto --stderror auto ^ --classpath=%path_jar%\myservice.jar ^ --startmode=jvm --startclass=webmuch.myservice --startmethod=main --startparams=start ^ --stopmode=jvm --stopclass=webmuch.myservice --stopmethod=main --stopparams=stop %prunsrv% //ts//%service_java% echo installation of %service_java% finish echo finished

when run batch file in shell command

installservice.bat

my service installed , running , when ever run service

myservice.exe //ts//myservice

it working fine .

but requirement run service on interval of every 2 hours automatically when personal scheme machine starts .

i do't know can create configuration regarding ?

if have thought please help me .

thanks lot in advance .

for 2 hours, can:

:loop rem phone call service timeout 7200 goto loop

java batch-file apache-commons

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -