X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=html%2Fcron.html;h=d4f82f46b81d858f8e852af1608ee76c59ab7a5c;hb=refs%2Ftags%2FR_1_49;hp=f3bfed6d4513793108b8180fab77a571ba744865;hpb=5c0ac3cd009dd3b97d90fa3e985438590200fe85;p=spider.git
diff --git a/html/cron.html b/html/cron.html
index f3bfed6d..d4f82f46 100644
--- a/html/cron.html
+++ b/html/cron.html
@@ -22,7 +22,7 @@
-Last modified: Fri Jan 19 14:25:13 GMT 2001
+Last modified: Mon Apr 23 01:00:44 BST 2001
Introduction
@@ -74,9 +74,14 @@ Last modified: Fri Jan 19 14:25:13 GMT 2001
to another cluster and a set of routines are specially provided in the context
of the DXCron package to make this easy. For example
+ start_connect('gb7tlh') unless connected('gb7tlh')
+
+ this could have also been written:
+
start_connect('gb7tlh') if !connected('gb7tlh')
- will attempt to start a connection process to GB7TLH if it isn't
+ but the first method is more 'perlish',
+ Either of these commands will attempt to start a connection process to GB7TLH if it isn't
already locally connected.
There is absolutely no reason why you could not do something more complicated using information
@@ -93,7 +98,7 @@ Last modified: Fri Jan 19 14:25:13 GMT 2001
# check every 10 minutes to see if gb7tlh is connected and if not
# start a connect job going
- 0,10,20,30,40,50 * * * * start_connect('gb7tlh') if !connected('gb7tlh')
+ 0,10,20,30,40,50 * * * * start_connect('gb7tlh') unless connected('gb7tlh')
# at 03:15 on Sundays start a job called 'analyse.pl' which does something
# or other. This starts a new process and runs to completion, be careful
@@ -114,12 +119,25 @@ Last modified: Fri Jan 19 14:25:13 GMT 2001
23 * * * * rcmd('rcmd/gb7dxm disc/noinform G9TLH') if present_on('G9TLH', 'GB7DXM')
+ # some people like to do an hourly announce to say who they are. There is a
+ # slight complication about this because of the announce duplicate checking
+ # so you need to make each announce unique. I do this by adding a date and time
+ # stamp on the end
+
+ 0 * * * * run_cmd('ann CLUSTER: GB7DJK JO02LQ at ' . cldate . ' ' . ztime)
+
It is important remember that these crontab routines execute in line with the main
cluster code, so if you create a long, slow crontab command, it will impact on the speed
and usability of the cluster as a whole.
+
If you want to see what commands are being run and/or the syntax errors in the
+ crontab, then run: set/debug cron on the console and monitor the
+ debuging output (I use watchdbg in another window).
+
+
To set the debugging back to normal do: unset/debug cron.
+
Standard Routines
As mentioned earlier, there are a small number of routines that are declared in DXCron
@@ -127,40 +145,34 @@ Last modified: Fri Jan 19 14:25:13 GMT 2001
They are:-
- - connected(<callsign>) - returns true if the <callsign> is directly connected
+
- run_cmd(<cluster command string>) - run any cluster command as
+ the node callsign. Any output is sent to the 'cron' debug channel
+ (set/debug cron to see this).
+
- connected(<callsign>) - returns true if the <callsign> is directly connected
to this cluster node.
-
- start_connect(<script-name>) - starts a connection
+
- start_connect(<script-name>) - starts a connection
script just as if you had typed in connect script-name on the sysop console client.
-
- spawn(<command>) - start a <command> as a new process. This is used to do
+
- spawn(<command>) - start a <command> as a new process. This is used to do
various batch jobs that you may wish to happen at certain times of the day or week that operate
on your machine but don't require access to the real-time internals of the cluster daemon. You can
execute just about any command you like, but be warned stdin and stdout are
still connected to the same terminal (if any) as the cluster daemon. Any unix command and arguments
can used, see exec in the perl documentation.
-
- disconnect(<callsign>) - disconnects a locally connected station from your node.
-
- rcmd(<node-call>, <command>) - send a command to another node in exactly the
+
- disconnect(<callsign>) - disconnects a locally connected station from your node.
+
- rcmd(<node-call>, <command>) - send a command to another node in exactly the
same way as, for example, RCMD/GB7TLH disc GB7DJK typed on a sysop console.
-
- present(<exact-callsign>) and presentish(<callsign-no-ssid>) - returns
+
- present(<exact-callsign>) and presentish(<callsign-no-ssid>) - returns
true if the
callsign is connected anywhere on the cluster either with the exact callsign or with the callsign
minus its ssid respectively.
-
- present_on(<exact-callsign>, <node>) and presentish_on(<callsign-no-ssid>, <node>) - returns
+
- present_on(<exact-callsign>, <node>) and presentish_on(<callsign-no-ssid>, <node>) - returns
true if the
callsign is connected on the node specified either with the exact callsign or with the callsign
minus its ssid respectively.
-
- last_connect(<callsign>) - Returns the last connect time of the callsign or the
+
- last_connect(<callsign>) - Returns the last connect time of the callsign or the
current time if it is currently connected locally.
- Caveats
-
- There was an intermittent problem when running
- (especially?) with the debugger on. Essentially you would
- experience random crashes with nonsensical error messages returning from funny places on the stack (if
- the debugger was on) or just core dumping (if it wasn't).
-
- I believe this now to be fixed. YMMV, if so tell me about it!
-