[Gllug] RE: [GLUG] Cron revisited

Cain Hurwitz churwitz at grinaker-lta.com
Thu Oct 24 12:03:47 UTC 2002


Ok here is what I think:

Create a file called java.script with the following:

#!/bin/bash

if [ ! -f /var/run/java.script.lock ]; then
        touch /var/run/java.script.lock
	/usr/local/jre1.3.1_04/bin/java -cp /apps/cf/htdocs/java_scheduler
WinForward >> /apps/cf/htdocs/java_scheduler/WinForward.log
Rm -rf /var/run/java.script.lock

((ignore case I have to use Outlook with word as editor))

Now copy this file to say /tmp

Then edit crontab and add this line:

*/2 * * * * /tmp/java.script


Cain Hurwitz
Tel:   +27 11 876-5000
Fax:  +27 11 873-3196
Mobile:  +27 82 8949782

-----Original Message-----
From: glug-bounce at linux.org.za [mailto:glug-bounce at linux.org.za]On Behalf Of
Neil Fryer
Sent: 24 October 2002 01:45
To: Glug (E-mail)
Cc: Gllug (E-mail)
Subject: [GLUG] Cron revisited

Hi again

Ok, here is the command that I want to run ever two minutes, but I have to
make sure that it completes before it runs again. Can someone please be kind
enough  to show me how I would do this, as I am really baffled here.
Thanks in advance.

1 * * * * /usr/local/jre1.3.1_04/bin/java -cp /apps/cf/htdocs/java_scheduler
WinForward >> /apps/cf/htdocs/java_scheduler/WinForward.log


Neil Fryer
Systems Administrator
12Snap UK Ltd
Tel:  +44(0)20 7534 7322
Fax: +44(0)20 7534 7301
Mobile: +44(0)7855 400 309
E-mail: neil.fryer at 12snap.com
http://www.12snap.com


----
To unsubscribe from this list: send the line "unsubscribe glug" in
the subject of a message to glug-request at linux.org.za. If you have a
problem unsubscribing, please mail glug-admins at linux.org.za


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list