Shell scipt..invoking command and exiting at fixed intervals

raju raju_ak at hotmail.com
Fri Jul 25 16:18:56 UTC 2008


mario/celeb,

Basically we had a java program which kept listening to tests whenever it
found one as part of automation api.It would pick any code changes to tests
through svn updates.But needed to exit every hour so that it could pick any
changes code to the java program itself and relaunch.

Moved the Timer aspect to java program itself.

Thanks both of you for your replies.

Raj


Mario Spinthiras-2 wrote:
> 
> I disagree with C/C++, stick to bash , its clean and simple. What I don't
> understand is what you want to do.
> 
> Do you want a bash script to run at a certain hour , for a certain hour ,
> exit and then run again for a certain hour ?
> 
> 
> Please elaborate on what its supposed to do. I'll be more than willing to
> help.
> 
> 
> Regards,
> Mario
> 
> On Thu, Jul 24, 2008 at 8:05 AM, Carl Friis-Hansen
> <ubuntuuser at carl-fh.com>
> wrote:
> 
>> raju wrote:
>> > Caleb Eggensperger wrote:
>> >> A better way to have a shell script invoked at timed intervals is to
>> use
>> >> cron (try "man cron"). If it absolutely must be done the way you say,
>> you
>> >> can use the "sleep" command in a "while true" loop.
>> >>
>> >> On Wed, Jul 16, 2008 at 3:14 AM, raju <raju_ak at hotmail.com> wrote:
>> >>
>> >>> Hi,
>> >>>
>> >>>
>> >>> I need to write a shell script.
>> >>> Based on command line param to script say demode=yes
>> >>> Need to run an ant command for an hour(configurable)
>> >>> Then exit
>> >>> Again run the ant command
>> >>>
>> >>> all this needs to be in a loop.
>> >>>
>> >>> Any one written a similar one or any links which could provide
>> helpful
>> >>> examples
>> If I were you I would write a small C or C++ program instead. It is much
>> more strait forward. In particular when you want loops.
>> Even Perl or PHP would be smarter than shell.
>> --
>>       +---------------------------------+-------------------+
>>       | Carl Friis-Hansen               | Fiskeryd Nybygget |
>>       | http://computingconfidence.com/ | 341 91  Ljungby   |
>>       | Phone: +46 (0)372 15033         | Sveden            |
>>       +---------------------------------+-------------------+
>>
>>
>> --
>> ubuntu-users mailing list
>> ubuntu-users at lists.ubuntu.com
>> Modify settings or unsubscribe at:
>> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>>
> 
> -- 
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
> 
> 

-- 
View this message in context: http://www.nabble.com/Shell-scipt..invoking-command-and-exiting-at-fixed-intervals-tp18484376p18655015.html
Sent from the ubuntu-users mailing list archive at Nabble.com.





More information about the ubuntu-users mailing list