cron question..

cron question..

Post by Yogendr » Sat, 02 Nov 1996 04:00:00



Hi I was wondering if the following problem could be solved
using cron.

I run a program(Java server) which occupies a particular port.
I would like this program to be started every time the machine is
rebooted, AND also everytime the program crashes(still in the early
stages ..:-))

Is this possible with cron??

Thanks in advance for any replies.

Yogendra Pillai

PS: An example would be even better... :-)
--
Name    : Yogendra Chandrasegaram-Pillai  

http://yallara.cs.rmit.edu.au/~yogendra

 
 
 

cron question..

Post by Omar Thame » Sat, 09 Nov 1996 04:00:00




> Hi I was wondering if the following problem could be solved
> using cron.

> I run a program(Java server) which occupies a particular port.
> I would like this program to be started every time the machine is
> rebooted, AND also everytime the program crashes(still in the early
> stages ..:-))

> Is this possible with cron??

> Thanks in advance for any replies.

> Yogendra Pillai

You'll want to put some lines in /etc/rc.d/rc.local to start your
daemon upon bootup.  As for a cron job to restart the program after
it dies, this would be unconventional but do-able.  If you're in that
much of a fix, you might consider running it out of inetd.conf so
that an instance gets exec'd each time the program is called.
For more info, "man inetd" and look at /etc/inetd.conf.

--
Omar Thameen                                           (                  )
Systems Administration     http://world.inch.com        ( sysadmin stuff )
The Internet Channel         http://www.inch.com         (   main page  )


 
 
 

1. cron question

I am running Solaris 2.6 but I think this will carry over to others as
well.

In cron I have a script that should redirect output to a file with the
date appended to the filename.  Like so:

15 4 * * 3 script > /my/home/dir/file-`date '+%m.%d.%y'` 2>&1

This only produced the filename "file-" and no date.  So after reading
up on crontab a little more I noticed that % is a newline character.
Ok, so I'll escape it with "\".  Problem solved.  So then crontab
looked like so:

15 4 * * 3 script > /my/home/dir/file-`date '+\%m.\%d.\%y'` 2>&1

Alas, not the complete answer.  Now I get a filename that looks like
"filename-\08.\31.\99.  Not exactly what I was looking for but closer.

Someone knows what I'm doing wrong, would that someone please point it
out?

Thanks,

~Jeff

2. Syquest EZ Drive and Linux?

3. bsdi cron question

4. 2nd Ed. Of Stevens Unix Network Programming?

5. Another cron question

6. Mirroring

7. Cron question

8. adding packages through ftp

9. cron question

10. Scan a Directory/cron question

11. cron question

12. another cron question