LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-06-2004, 08:45 AM   #1
tapishk
LQ Newbie
 
Registered: Dec 2004
Posts: 2

Rep: Reputation: 0
Automate the Scheduling of the User-defined services


Hello,

I created a shell script "alpha.sh" which runs some Java files and they in particular dump data from a flat file into the database.
Now I need to schedule them in sucha a manner that i run them very two hours..

So i tried using its reference ( /sbin/service alpha start) in crond . It started running without any hitch. But the problem is that we need to stop the alpha.sh too since the database entry will not be reflected until unless the alpha service is stopped. I tried using "service alpha stop" but in vain.
What Do i do? ANy Suggestions would be valuable...

Can I try killing the pid thru crond? if yes how?

Tapish
 
Old 12-14-2004, 08:25 PM   #2
mhiggins
Member
 
Registered: Feb 2004
Posts: 140

Rep: Reputation: 15
Is there a reason this script needs to run as a service ? Does it simply run .. collect data then end ? does it need to run for a period of time?

If the script properly implements the stop() method service <service_name> stop should work fine.

-Matt
 
Old 12-14-2004, 10:39 PM   #3
tapishk
LQ Newbie
 
Registered: Dec 2004
Posts: 2

Original Poster
Rep: Reputation: 0
I would like this to be scheduled at regular intervals, say at 1 hour. This just collects data from the Flat files and dumps into the database.

Ideally would like this service to run for some time , say 5-10 mins and then automatically end.

I do have a script which runs those JAVA files. There are around 4-5 files which dump data into various tables.

Tapish
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
User defined protocols with Guarddog Shafted Linux - Security 4 09-01-2005 12:56 PM
at (the task scheduling program) won't work using regular user BL/|CK S3RP3NT Linux - Software 3 03-20-2005 03:32 AM
How to run user defined services and exe files on linux. Prabhat Sharda Linux - Software 6 01-05-2005 03:54 AM
user defined variables linuxdev Linux - Newbie 4 02-09-2004 12:43 PM
C++: How to use a namespace in a user-defined library? Gethyn Programming 9 08-15-2003 05:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration