Gossamer Forum
Home : Products : Links 2.0 : Customization :

staggered cron?

Quote Reply
staggered cron?
have a second homepage for my links DB which builds a second 'stripped down' links main page:

I build my links via cron at the moment

heres my little bash script

#!/bin/bash
echo "Today is `date`"
echo ""
echo ""
echo "Building Links"
echo ""
# Rebuild Links pages
# normal cron below
/home/cpfc/www/links/cgi-bin/admin/nph-build.cgi
staggered=1&auto=1
echo "Links Built"

works like a charm :)

My problem is that to update my second homepage I need to run the staggered build.
When I try to cron the staggered build it faiils- I suspect because I pass a query string:

#!/bin/bash
echo "Today is `date`"
echo ""
echo ""
echo "Building Links"
echo ""
# Rebuild Links pages
# normal cron below
#/home/cpfc/www/links/cgi-bin/admin/nph-build.cgi
# build staggered to include second homepage
/home/cpfc/www/links/cgi-bin/admin/nph-build.cgi?staggered=1&auto=1
echo "Links Built"

heres what happens when I try to run it as a test

./buildlinks2
Today is Thu Mar 22 11:48:21 EST 2001


Building Links

Links Built


./buildlinks2: /home/cpfc/www/links/cgi-bin/admin/nph-build.cgi?staggered=1: No
such file or directory


Quote Reply
Re: staggered cron? In reply to
 
Does the following really words like charm? Then just use this code with staggered on the second line.
Code:
# normal cron below
/home/cpfc/www/links/cgi-bin/admin/nph-build.cgi
staggered=1&auto=1
echo "Links Built"

works like a charm :)
Quote Reply
Re: staggered cron? In reply to
that did it- thanks

Dave

Quote Reply
Re: [davitch] staggered cron? In reply to
Mmh - I have some probs here running a staggered cron. I tried to use this code:

#!/bin/bash
/home/bla/bla/links/cgi-bin/admin/nph-build.cgi
staggered=1&auto=1


But I received this error message: /home/bla/bla/links/cgi-bin/admin/nph-build.cgi?staggered=1: No such file or directory

Could anyone guide me in the right direction, please?

Thx and cheers,

Roadrunner
Quote Reply
Re: [RoadRunner] staggered cron? In reply to
Yea...you have to change the PHYSICAL paths in the cgi script reference to _your_ paths. The BLAs and stuff were used as an example.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Stealth] staggered cron? In reply to
Stealth, thanks for your reply. I sure changed that to my own server path. I actually changed the original post to Bla/Bla to reflect the changes.

The problem is that using this

/home/bla/bla/links/cgi-bin/admin/nph-build.cgi

the cron runs fine. But I get a server timeout because the process gets killed due to timeout restrictions from my provider. So I tried to run the cron staggered - and thatīs where my problems begin Crazy.

Using this

#!/bin/bash
/home/bla/bla/links/cgi-bin/admin/nph-build.cgi
staggered=1&auto=1

does not work because the staggerd=1&auto=1 is ignored. And using this

#!/bin/bash
/home/bla/bla/links/cgi-bin/admin/nph-build.cgi?staggered=1&auto=1

I get the following error message: /home/bla/bla/links/cgi-bin/admin/nph-build.cgi?staggered=1: No such file or directory

So how can I use a cronjob to execute the file staggered?

I even tried to use a cronjob using something like this 0 0 * * * lynx -dump -auth=login:pwd http://www.my-domain.com/...aggered=1&auto=1 but only the first step gets executed.

Cheers,

RR
Quote Reply
Re: [RoadRunner] staggered cron? In reply to
***Bump***

nobody?

FrownUnsureSmile