Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Build Staggered from command line

Quote Reply
Build Staggered from command line
I would like to build every 24 hours, automated via cron. But the process sometimes gets killed on my shared server space, something which never happened when building in Links 2.

Is there any way to do a staggered build from the command line?

Quote Reply
Re: [YoYoYoYo] Build Staggered from command line In reply to
Don't think you can do staggered, but use this
command to build "changed" links:

nph-build.cgi --changed

Even better, set cron to run the following script and it will send you a report so you can check if the build went correctly or not. Set script to chmod 700.

Code:
#!/usr/bin/perl
$buildoutput = `/path/cgi-bin/admin/nph-build.cgi --changed`;
open (MAIL,"|/usr/sbin/sendmail -t");
print MAIL "From: you\@you.com\n";
print MAIL "To: you\@you.com\n";
print MAIL "Subject: Build Report\n\n";
print MAIL "$buildoutput\n\n";
close (MAIL);

~ ERASER


Free JavaScripts @ Insight Eye

Last edited by:

Eraser: Oct 11, 2001, 2:27 AM
Quote Reply
Re: [Eraser] Build Staggered from command line In reply to
I don't think that's neccessary as cron will email you automatically the output of any script.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Build Staggered from command line In reply to
> cron will email you automatically the output of any script.

It does. Too often, the output ends with "Killed".

What I am trying now is to pipe the output through grep "All done" to a file. Subsequent cron scripts invoke nph-build.cgi only if the size of this file == 0 kb (ie: the last attempt failed). Not very robust or elegant.