PDA

View Full Version : phpAdsNew/Cron


Lemmy
2006-01-26, 09:43 AM
Anybody familiar with phpAdsNew out there? I sure could use some help!

I'm trying to set up the cron job to run the maintenance script in PAN, but so far neither I nor my host support has succeeded in making it work. I'm still getting that annoying warning pop-up.

This is the (current) code in my cron:
0**** lynx -dump http://gon-ads.com/adserver/maintenance/maintenance.php
I don't have cPanel, so support is doing everything for me. I know how to log in with Putty and look at the code myself, but I don't know how to edit it.

Any help/suggestions would be appreciated. TIA

Cleo
2006-01-26, 09:46 AM
This is what mine looks like

## Needed by PHPAds
10 10 * * * lynx -dump http://www.cleos-porn-links.com/cgi-bin/phpads/maintenance/maintenance.php > /dev/null 2>&1

Lemmy
2006-01-26, 09:57 AM
Thanks Cleo. From what I can see they're pretty identical except for this part: > /dev/null 2>&1 and that's to prevent the script from e-mailing you every time the cron runs, yes?

I'm going to find a few tuts on cron/ssh. It's a bitch having to rely on my host to get every little thing done.

Cleo
2006-01-26, 10:06 AM
Yes that is correct.

I just SSH into my server and open a shell to edit my crontab. Vi is my editor and can be a bit confusing. Here is a page on using Vi.
http://staff.washington.edu/rells/R110/#basics5

SSH into your server
ssh USERNAME@YOURDOMAIN.com
HIT RETURN
it will ask you for your password and not show what you type.
HIT RETURN
crontab -e
HIT RETURN

This should put you in your default editor which most likely is Vi

Lemmy
2006-01-26, 10:30 AM
Well that explains a few things. I tried using the Putty interface just as a regular text editor, which apparently doesn't work, lol. Thanks for that link.

natalie
2006-01-26, 06:20 PM
this is what mine looked like when I was moving:
/usr/bin/GET -d http://www.pun-an-i.com/dir/maintenance/maintenance.php
No idea if its the same now cause it was all done for me :D

CalModels
2006-01-29, 03:03 AM
Try curl instead of lynx

0 * * * * curl -s -o /dev/null http://bah.humbug.com/maintenance/maintenance.php

m0nk3yb0y
2006-01-30, 01:42 AM
Thnx for your posts guys. I been trying to get a script of mine to run through cron for a while and couldn't figure out why it was trying to run a php file as a bash script. Guess sometimes you just have to think outside the box.... so to speak |crazy|

Lemmy
2006-01-30, 06:35 AM
Finally got it to work! This was the magic code that did the trick:
0**** /usr/local/bin/lynx -dump http://gon-ads.com/adserver/maintenance/maintenance.phpThanks for the help everybody.