Current position:  Home > Default > Auto run application

Auto run application

Time:November 30
Advertisement
I want to develop a application that auto run on the server everyday.
The application should be satisfy the following requirement:
1. auto run on scheduled time
2. immediately run after the server restart
I suppose to use Servlet. plse give me any idea.
sample code or example is helpful, Thank a lot !
Advertisement
hi,
if you use the solution with the crontab your java program is monitored. if the program crashes the cron starts it again. put you have to write a shellscript to start the javaprogram and to check out the program already runs.
here a little script to start
#=====================================
CLASSPATH=**your CLASSPATH**
JAVA_HOME=**your JAVA_HOME**
PATH=$PATH:$JAVA_HOME/bin
**your environment**
export CLASSPATH JAVA_HOME PATH **your environment**
#is the program running? (not the best solution but it should work ;-))
a=`ps -ef | grep **your programm**`
if [ "$a" == "" ]
then
nohup java **your program** 1>**your logfile** 2>&1
fi
#=====================================
the crontab entry:
*/10 * * * * your program
the 5 starts mean:
minute,hour, day,month,day of week -> look at the man page (man 5 crontab)
to edit the crontab use the command crontab -e under the useraccount where the program should run.
to write a startscript (rc-Script) you can look at the skeleton-file. normaly it is in /etc/rc.d. name skeleton.
copy that file and edit it. after that link the file to the runlevel-directory.
hope it helps
carsten

Autologin as user, auto run application as admin

-0001-11-30

Hello, I am just trying to figure our if there is a solution for my problem.  I do not want to give the user full admin rights. Every time when Windows Server 2012 reboots, I need a user to login automatically and one of the applications should run.

Auto running applications at start up...

-0001-11-30

Hi... I'm reasonably new to macs. I've got a couple of small 'menu bar' apps that I would like Mac OS X to auto-run whenever I boot my MBP up. How do I get OS X to do this...? ThanksSystem prefs - -> Accounts - Login items. Click the + sign at the bo

Auto Run Application On Network Connect

-0001-11-30

I have a very simple application that I created in Automator. I want this application to automatically run only after I connect to a *particular wireless network*. I want this all to happen in the back ground (hence the "automatic". Is there any

Auto run applications

-0001-11-30

Hi , When turn my mac on a few apps like Microsoft word immediately run . How can shut them down   Managing Mac OS X Lion's application resume feature Disable Lion’s Resume Checkbox When Shutting Down [Video How-To] | Cult of Mac Dealing With The Res

Auto-run Application After Bluetooth Connection *solved*

-0001-11-30

I was wondering if there was a way to immediately run an application after establishing a connection to a specific Bluetooth device. For example, I have a DualShock 4, and there's an application out there that lets you customize the LED and use the t

Auto run Servlet

-0001-11-30

I want to develop a Servlet application that auto run on the server everyday. The application should be satisfy the following requirement: 1. auto run on scheduled time 2. immediately run when the server restart Any idea to do this ? Plse help Also,

Application auto run

-0001-11-30

I have write a application in C language,and I want it could auto run with os boot. I write a start script, placed it in the directory /etc/init.d. There also I created a hard link in the directory /etc/rc3.d, and the link file named "S99XXXX",

How to set Lion built-in FTP Server auto run off

2015-10-11

Hello all. I set FTP Server by using Rumpus Server application. But Lion's built-in FTP Server is running on the front. So if I try to connect my FTP Server out of my LAN, I can only connect to the built-in FTP Server despite I wanted to connect Rump

Auto run

-0001-11-30

I am trying to install Cakewalk music creator LE however, it only lets me use a autorun install feature which my mac doesn't have the application to run. Can anyone help me solve this problem, in a nutshell how to run auto run on my mac? Thank you in

Auto Run ignores URL parameters and uses Defaults on first run

-0001-11-30

We have BI Publisher 11g standalone (not OBIEE). We have a suite of BI Publisher reports, all set up on data sets with default parameters. All reports have Auto Run enabled and caching disabled. The reports are run from a Flex UI application using a

Auto Run off but report access via URL generates default

-0001-11-30

Hi, We have BI Publisher 10.1.3.4.1. I access reports via URL from another application outside BI Publisher. For my reports, I have Auto Run disabled. Still Accessing the link via URL seems to generate report instead of waiting for user to enter para

Auto-Run Code on OC4J start

-0001-11-30

Hi, Is is possible to Auto-Run a piece of code, either by calling a method on a Session bean or calling a Servlet, when OC4J is started up? Cheers, RoHi You can also use a servlet that implements ServletContextListener - this fires before the applica

No auto run on CS4 student licensing

-0001-11-30

I just purchased CS4 Design Standard to install on an HP laptop running Vista 64, sp1. I purchased it this summer, so it is fairly new. When I tried to install from the first disc in the case entitled, "Application 2," I get the following error

Idle logout terminates running applications

-0001-11-30

Hi, I have a problem that I'm logged out after a specific idle time period and that all running applications are exited. The strange thing is I haven't turned on any "logout after X minutes of inactivity" option. At least that's what I think. Ho

Why i insert a CD to install a camera, but the auto run doesnt start???

-0001-11-30

Why i insert a CD to install a camera, but the auto run doesnt start???Mac software typically does not run installers on inserting the optical media (CD or DVD.) You have to go inside it and find for the installer application - if you can't find it l

Downloaded torrent files no longers auto-run after downloading

-0001-11-30

When downloading a torrent file, Firefox use to auto-run the file after completing download. Resulting in the file being added to my torrent program. Now it stopped doing that and I can find where the setting is to change this behavior. Yesterday i d

Help, a auto-running program

-0001-11-30

i need to implement the function that it will transfer the records that match some conditions in A table to B table. Question: 1, if implement this function at the side of DataBase, how to do it. 2, if implement this function using java programe, how

Crashes when running applications from network share - "Windows cannot access the file for one of the following reasons"

2015-10-11

Hi, starting a couple of weeks ago, we get the following error(s) when running applications from a network share. We don't know what causes this, we are not aware of any major changes in our network infrastructure or client/Server configuration. We d

HELP: SimplePass that apart from open web pages, can also run applications

2015-10-11

Operating System: Windows 7 Good, to buy my laptop HP Pavilion m6, I came a version of SimplePass in which could add web pages, passwords and also run applications (such as games), but then I gave for updates thinking that a next version would contai