Registered: 04/23/02
Posts: 1929
Loc: Virginia, USA
You're not very good at this cron stuff, are you. <img src="/forum/images/graemlins/tongue.gif" alt="" /><br /><br />Maybe should just get up at 2AM every day, and run the script manually. <img src="/forum/images/graemlins/wink.gif" alt="" /> <br /><br />P.S. Congrats to Josh for spotting that error. I never noticed the discrepency between the .pl file extension and the php subdirectory.
_________________________
UBB.threads beta tester / threadsdev.com moderator Software consulting services including UBB.threads problem resolution / installs / upgrades / customization.
ok, managed it<br />i deleted the original crontab, removed it from the server.<br />uploaded new one, and it installed.<br />will find out later if it works or not!<br />
#227251 - 11/07/0201:11 PMRe: help with CRON pls, namely doexpire.pl
[Re: Luka_dup1]
JoshPet
I type Like navaho
Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Can you run<br /><br />yourdomain/ubbthreads/cron/php/doexpire.php in your browser?<br />You wont' receive any output... but it would tell you if permissions into those directories was correct.<br /><br />Check the permissions not only on the file.. but make sure the permissions for those directories are allowing you to access it as well. <br /><br />Otherwise... I give us. <img src="/forum/images/graemlins/tongue.gif" alt="" /> <br /><br /><shrug><br /><br /><img src="/forum/images/graemlins/frown.gif" alt="" />
Registered: 04/23/02
Posts: 1929
Loc: Virginia, USA
Are you sure that the PHP static module, as well as the PHP Apache DSO, is installed on your server? What happens if you type "php -v" from the command line (telnet)?
_________________________
UBB.threads beta tester / threadsdev.com moderator Software consulting services including UBB.threads problem resolution / installs / upgrades / customization.
if i type php -v i get:<br />php: command not found<br /><br />how do i run something from the command line joshpet?<br />i know it's not run, i just tried! <br />I went to the cron/php folder and typed in doexpire.php and i got command not found.
Registered: 04/23/02
Posts: 1929
Loc: Virginia, USA
if i type php -v i get:<br />php: command not found<br /><br />Ok, that means that either the static PHP binary is not installed on your server, or else it's not in the default path.<br /><br />What happens when you use the command "which php"?
_________________________
UBB.threads beta tester / threadsdev.com moderator Software consulting services including UBB.threads problem resolution / installs / upgrades / customization.
lol, all these questions i ask has turned me into a journeyman! <img src="/forum/images/graemlins/smile.gif" alt="" /><br />anyway, when i type in which php i get:<br />php: command not found<br />(surprise surprise, this is turning out to be the story of my life!<br />"Monkeyra and his lost commands!")
Registered: 04/23/02
Posts: 1929
Loc: Virginia, USA
I'd say you have two choices.<br /><br />1) Download the PHP distribution from php.net and install it as a static executable. That would allow you to run PHP from the command line or from the cron table. The distribution includes documentation, but if you need additional help with that, I think there's some documentation on the Infopop Community site.<br /><br />2) Use the Perl version doexpire.pl, assuming you have Perl installed. Run "perl -v" to check that.
_________________________
UBB.threads beta tester / threadsdev.com moderator Software consulting services including UBB.threads problem resolution / installs / upgrades / customization.
#227258 - 11/07/0208:21 PMRe: help with CRON pls, namely doexpire.pl
[Re: Luka_dup1]
JoshPet
I type Like navaho
Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
[]I went to the cron/php folder and typed in doexpire.php and i got command not found.<br />[/]<br /><br />That would be running it. Simply typing in the command yourself.<br /><br />I don't understand if the doexpire.php is in that directory.... why it would say "command not found".... unless that's "doexpire" running and failing with some command.<br /><br />Dave is probably the expert here. I am truly the novice with Cron jobs... but have a few tricks to check which sometimes work. <br /><br /><img src="/forum/images/graemlins/crazy.gif" alt="" />
Registered: 04/23/02
Posts: 1929
Loc: Virginia, USA
To run doexpire.php from the command line, you would type in "php doexpire.php". At least, that's how I do it on my server. Of course, that won't work in this case, since the command-line version of PHP is apparently not installed on the server.
_________________________
UBB.threads beta tester / threadsdev.com moderator Software consulting services including UBB.threads problem resolution / installs / upgrades / customization.
i cant get my cronjob to install now!<br />this is doing my nut!!<br />can you guys see anything worng with these two lines?<br /><br /><br /> [] * 1 * * * /usr/local/etc/httpd/htdocs/ubbthreads/cron/perl/doexpire.pl<br />* 2 * * * /usr/local/bin/vnukelog [/]
#227261 - 11/08/0212:50 AMRe: help with CRON pls, namely doexpire.pl
[Re: Daine]
Gardener
Addict
Registered: 05/11/99
Posts: 1956
Loc: Sweden, Uppsala
The reason it says command not found when trying to run a program in the current directory from the command line is most probably because the current directory isn't in the path. Putting "./" in front of the command changes that, like so:<br />./doexpire.php<br /><br />But in this case it won't work anyway, since php-scripts have to be run via the php binary as stated before.
#227262 - 11/08/0212:57 AMRe: help with CRON pls, namely doexpire.pl
[Re: Luka_dup1]
Gardener
Addict
Registered: 05/11/99
Posts: 1956
Loc: Sweden, Uppsala
Maybe it doesn't like that you are using * for minutes, that means it will run every minute. Either way, it isn't a good idea to run the scripts so often, so you should start with a 0, like this:<br /><br />0 1 * * * /usr/local/etc/httpd/htdocs/ubbthreads/cron/perl/doexpire.pl<br /><br />Have you made sure that the above command is working from the command-line? It's always a good thing to try that out first to rule out misspellings in paths or permission problems on the script.
that doesnt work either!<br />i'm at a loss to understand why, it installed ok a few days ago<br />i cant run from command either, i just tried<br />i get command not found.<br />although perl -v works<br />