Skip to content
Advertisement

How to execute jython script for every 120 seconds in IBM WebSphere Application Server in linux?

JavaScript

This is the code I am executing in WAS /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/

The above path where i am executing this script But i need execute those script for every 120 seconds, above script i am getting input from user.. In cron tab is not possible..

Advertisement

Answer

I have added the code below to execute jython script for every 120 seconds to generate dump in IBM Websphere

def print_time( threadName, delay):
while 1: time.sleep(delay) print "%s: %s" % ( threadName, time.ctime(time.time()) )
execute code here try: thread.start_new_thread( print_time, ("Thread", 120, ) )
except: print "Error: unable to start thread" while 1: pass

Above code works fine for me..

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement