File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

crontab for application

 
alireza seighalani
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi everyone

i want to stop or start an application in a specified time in weblogic 9.2.0.1 by cronjob . how can i run it? thanks in advance
 
alireza seighalani
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my problem solved:

you shoud put start and stop scripts in /opt/bea/weblogic92/common/bin:

startapp.py

"""
Sample script demonstrating usage of WLSTHome directory where users
can add commands to wlst namespace. This script is executed when WLST is first invoked, and
all functions defined in this module will be available to wlst out of the box.
If user would like to specify another directory they could very well do so
by specifying -Dweblogic.wlstHome=<another-directory>.
Please make sure that any commands you add do not collide with commands already
defined by WLST.
@author Satya Ghattu
Copyright (c) 2004 by BEA Systems, Inc. All Rights Reserved.
"""
username = 'weblogic'
password = 'weblogic-password'
url = 't3://10.1.20.33:7001'



## Connect to the AdminServer

try:
connect(username, password,url)
except:
connect(username, password,url)

progress=startApplication('application-name');
disconnect();

exit()



stopapp.py:

"""
Sample script demonstrating usage of WLSTHome directory where users
can add commands to wlst namespace. This script is executed when WLST is first invoked, and
all functions defined in this module will be available to wlst out of the box.
If user would like to specify another directory they could very well do so
by specifying -Dweblogic.wlstHome=<another-directory>.
Please make sure that any commands you add do not collide with commands already
defined by WLST.
@author Satya Ghattu
Copyright (c) 2004 by BEA Systems, Inc. All Rights Reserved.
"""
username = 'weblogic'
password = 'weblogic-password'
url = 't3://10.1.20.33:7001'



## Connect to the AdminServer

try:
connect(username, password,url)
except:
connect(username, password,url)

progress=stopApplication('application-name');
disconnect();

exit()
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic