Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Daily Cron Event to Build Links SQL??? >>

Quote Reply
Daily Cron Event to Build Links SQL??? >>
Hi,

I found this link in the resources for setting up a crontab event to make Links build daily...

http://goodstuff.orphanage.com/cron_instr.html

Will this tutorial still work for Links SQL 2.1.1 ??? I noticed it was written for an earlier version of Links some time ago so I thought I better check.

Is there now a better way to have Links SQL do a daily build?

Any help would be awesome.

Last edited by:

Jonze: Aug 20, 2002, 2:24 PM
Quote Reply
Re: [Jonze] Daily Cron Event to Build Links SQL??? >> In reply to
Bumperty Bump Bump... Tongue

Anyone know about this crontab stuff??? I'd like to use the Build Changed or Build Staggered if possible to cut down on server resources. Any help would be great, I just really need to get automated builds in place.

Will that tutorial work for LinksSQL and are any customizations needed to the tutorial?

Thanks!
Quote Reply
Re: [Jonze] Daily Cron Event to Build Links SQL??? >> In reply to
Yes, that tutorial only uses Links 2.0 as an example. If you have Cron installed on your server, then you can use that tutorial to set up your crontab.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Jonze] Daily Cron Event to Build Links SQL??? >> In reply to
1 0 * * * /full/path/to/nph-build.cgi --changed

Or you can be fancier:

1 0 * * * /full/path/to/nph-build.cgi --changed 1>/path/to/linkssql.stdout 2>/path/to/linkssql.stderr

....to capture any output.

That would be along the lines of the command you need. You will need shell access though, unless you write a little perl script to do it.

system("crontab mycronfile.txt") == 0 or die "$!, $?";

Then just put that command on the first line into mycronfile.txt

You can check it worked with:

crontab -l

Last edited by:

Paul: Aug 22, 2002, 5:07 PM
Quote Reply
Re: [Jonze] Daily Cron Event to Build Links SQL??? >> In reply to
We have found the easiest way is to put the commands in a shell script, eg:

Code:
#! /bin/sh

## check_and_build_directory.script

/bin/date
echo "Directory: check links, build pages"

echo "==========================================================="
echo "Checking links from 5 days"
perl <PATH_TO>/admin/nph-verify.cgi --check_from 5

echo "==========================================================="
echo "Re-checking problem links"
perl <PATH_TO>/admin/nph-verify.cgi --check_problem

echo "==========================================================="
echo "Build directory"
perl <PATH_TO>/admin/nph-build.cgi --changed

echo "==========================================================="
echo "Done"

Then get cron to run the script:
Add a line like this to mycron.txt (or whatever you call it) ...
Code:
50 1 * * * nice -20 sh $HOME/scripts/check_and_build_directory.script
Update your cron table by running crontab mycron.txt
Quote Reply
Re: [YoYoYoYo] Daily Cron Event to Build Links SQL??? >> In reply to
Hey! Thank you guys so very much! Wink

After reading your post and doing a bit more research I think I'm ready to tackle this crontab. All the info was very useful. The shell script method looks interesting. I'll have to look into that some more.

Thanks again,

Ryan