Gossamer Forum
Home : Products : Links 2.0 : Discussions :

How do I run recip.cgi from cron?

Quote Reply
How do I run recip.cgi from cron?
Hi all,
Hope someone can help, I am running lonks 2 on a Unix server and have successfully installed the reciprical link checker. I now have a lot of links though and when I run from the browser, it just times out every time. I read that you can schedule it to run from cron. Now this sounds like it might be what I need to do, but the problem is I don't know how! I'd like to schedule it to run weekly say on a Friday afternoon at 2pm. Please help. I do have telnet access, but I've never used it.

Thanks
Annii
PS (Having never done anything like this before I need an idiots guide!!)

Quote Reply
Re: How do I run recip.cgi from cron? In reply to
Please check Bobsie's instructions on how to set up cron events.

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

I hope it helps. Wink

Thomas
http://links.japanref.com
Quote Reply
Re: How do I run recip.cgi from cron? In reply to
Thanks Thomas, but the page you gave me is for building pages and I want to run recip.cgi also its for linux, will this work on Unix?
I know the principle are probabley the same, but as I said, I really haven't a clue about this stuff, so it would be really useful if you or anyone else could give me a step by step guide specifically for use with the recip mod.

Thanks again
Annii

Quote Reply
Re: How do I run recip.cgi from cron? In reply to
Bobsie's instructions should give you a general idea. The same principles apply to setting up a cron event with recip.cgi. Add something like the following to your mycron.txt (of course you have to adapt the settings and the path):
Code:
0 1 * * * /home/yourdomain/www/cgi-bin/recip.cg
Thomas
http://links.japanref.com
Quote Reply
Re: How do I run recip.cgi from cron? In reply to
Well yes they give me a general idea....but like I said, I really am a total newbie at this and just to give you one example; I wouldn't know how to edit the schedule from a daily one to a weekly one.
I know that even with step by step instructions, I'm going to have to workout how to use Telnet!!! But I just don't feel confident enough to try to re-write this on my own.....can anyone help?

Quote Reply
Re: How do I run recip.cgi from cron? In reply to
Annii,

there is really nothing you have to rewrite. As for re-scheduling your cron event: I am afraid I cannot be any clearer than Bobsie. I was a total newbie too when I was first confronted with Cron. I found his instructions very helpful. Wink

Thomas
http://links.japanref.com
Quote Reply
Re: How do I run recip.cgi from cron? In reply to
Ok Thomas you were right, I sat down with acup of coffee and a printed version of the instructions and thought about it. Anyway I've done what I think will work and got all the right signs from crontab -l
All I can do now is wait and see if it actually works....the bit that confuses me still is that in the instructions, it suggests naming the file as either build_links.sh or verify_links.sh now I am using this for the recip checker mod so I called the file recipr.sh will that work ok? could I have called it anything I wanted? the script that is being executed is recip.cgi

Thanks for your help and patience.

Annii

Quote Reply
Re: How do I run recip.cgi from cron? In reply to
Glad you managed, Annii. I have to admit that I am not familiar with the recip checker mod, but renaming the .sh files should pose no problem. Tell us if it worked.

Thomas
http://links.japanref.com
Quote Reply
Re: How do I run recip.cgi from cron? In reply to
The name of the SHELL file doesn't matter as LONG as you reference the proper SHELL file in your CRONTAB entry.

Regards,

Eliot Lee
Quote Reply
Re: How do I run recip.cgi from cron? In reply to
OK,
Now I need some more help! It didn't work!
These are some things I've tried to do once it didn't work the right way, and they still don't work.

1 When I go to the Links 2 Admin Manager, the recip Mod has a link in the admin panel, 1 to run the script (recip.cgi) and 1 to run the report recip.html. And it states If Run from cron just view report. So going back to the instructions I used, it said to put the line
/home/path/web/cgi-bin/admin/recip.cgi > /home/path/web/cgi-bin/logs/recip.log
in the file I called recip.sh (oh yes and I did use the same name for the shell in mycron.txt Elliot thanks).
So, I thought, maybe I don't need the > /home/path/web/cgi-bin/logs/recip.log bit as recip.cgi already writes to recip.html when run. So I deleted it and tried again.

Anyway it still didn't work.

2 The other thing I did was as I have another instance of Links 2 running (smaller db and not timing out with the recip.cgi script as the other instance now is) I thought I'd try that too, running it at a different time. Now I don't know if this is right or not, but I just added a second line to mycron.txt pointing to another .sh file called recip2.sh when I type crontab -l in telnet, it lists both files. Anyway, neither instance worked.

Please help.

Thanks
Annii

Quote Reply
Re: How do I run recip.cgi from cron? In reply to
Thanks Elliot, I did, but sadly it still doesn't work, if you have a minute could you read my last reply to Thomas which details the promlem and see if there is anything you can add?
Thanks

Annii