[Dxspider-support] Dxspider Ubuntu Local_cmd -> crontab
Dirk Koopman G1TLH
gb7tlh at dxcluster.org
Mon Jan 30 18:56:46 GMT 2012
On 28/01/12 16:41, Michael Serowik wrote:
> Will this work?
>
The short answer, as you may have discovered, is no.
>
> # Get Latest Spider
> 00 5 * * * * spawn("/spider/git pull")
>
Try: spawn("cd /spider; git reset --hard; git pull")
> # Connect to the cluster feed
> 01,06,11,16,21,26,31,36,41,46,51,56 * * * * start_connect('wr3d') unless
> connected('wr3d')
>
> # Connect to the cluster feed
> 00,05,10,15,20,25,30,35,40,45,50,55 * * * * start_connect('kb1h') unless
> connected('kb1h')
>
> # Update stats for mrtg on website
> 00,05,10,15,20,25,30,35,40,45,50,55 * * * * run_cmd('mrtg all')
>
These are fine.
> # Broadcast the Cluster Information
> 00 * * * * run_ann('ann Cluster: N3BSQ-1 at ' . cladate . ' ' .stime)
>
PLEASE (please) don't do this, otherwise you will find yourself in
everybody's set/badcall files.
> # Download the USDB file
> 00 05 * * 1,3,5 spawn("wget -qN ftp://ftp.w1nr.net/usdbraw.gz>>
> /spider/local/usdbraw.gz")
> 02 10 * * 1,3,5 spawn("/spider/perl/create_usdb.pl
> /spider/local/usdbraw.gz")
> 02 15 * * 1,3,5 run_cmd("load/usdb")
> 02 16 * * 1,3,5 spawn("rm usdbraw.gz")
>
You can do it as I have modified it above, note the passing of time
between each stage. Otherwise you can do the whole thing in fewer lines.
00 05 * * 1,3,5 spawn("cd /tmp; wget -qN ftp://ftp.w1nr.net/usdbraw.gz;
/spider/perl/create_usdb.pl usdbraw.gz")
02 15 * * 1,3,5 run_cmd("load/usdb")
02 16 * * 1,3,5 spawn("rm usdbraw.gz")
Or, if you have created the /spider/cmd_import directory then you can do
the whole thing in one go:
00 05 * * 1,3,5 spawn("cd /tmp; wget -qN ftp://ftp.w1nr.net/usdbraw.gz;
/spider/perl/create_usdb.pl usdbraw.gz; echo 'load/usdb >
/spider/cmd_import/loadusdb; sleep 20; rm usdbraw.gz")
>
> # Download Satellite informaiton
> 00 05 * * 1,3,5 spawn("wget -qN
> http://www.celestrak.com/NORAD/elements/amateur.txt>>
> /spider/local/amateur.txt")
> 02 05 * * 1,3,5 spawn("/spider/perl/convkeps.pl /spider/local/amateur.txt")
> 02 05 * * 1,3,5 run_cmd("load/keps")
> 02 05 * * 1,3,5 spawn("rm /spider/perl/amateur.txt")
The same principle applies here.
>
> # Broadcast the Cluster Information
> 00 * * * * run_ann('ann Cluster: N3BSQ-1 at ' . cladate . ' ' .stime)
>
And you certainly don't need to do this twice!
Dirk
More information about the Dxspider-support
mailing list