my file is called cronjobs and it's located in the root directory.<br />this is whats inside it.<br /><br />0 2 * * * root /usr/local/etc/httpd/htdocs/ubbthreads/cron/php/doexpire.pl<br />0 1 * * * /usr/local/bin/vnukelog <br /><br /><br /><br />i've also got a file below it called crontab.save and inside it is this<br /><br />0 2 * * * root <br />/usr/local/etc/httpd/htdocs/ubbthreads/cron/php/doexpire.pl<br /><br />logout<br /><br />
Registered: 04/23/02
Posts: 1929
Loc: Virginia, USA
Try removing "root" from the entry. I don't know why Infopop's documentation says to put that in.<br /><br />P.S. This is my 700th post, so I'm now an "old hand" <img src="/forum/images/graemlins/laugh.gif" alt="" />
_________________________
UBB.threads beta tester / threadsdev.com moderator Software consulting services including UBB.threads problem resolution / installs / upgrades / customization.
btw, when i get the e-mail saying it dont work, this is always in the subject line, if it's any help.<br />Cron <nickjenk> root /usr/local/etc/httpd/htdocs/ubbthreads/cron/php/doexpire.pl
Registered: 04/23/02
Posts: 1929
Loc: Virginia, USA
Hmmmm ...... If "root" isn't in the cron table entry, then I don't know where it's getting the "root" from.<br /><br />On my server (Linux Redhat 7.0), I set up cron jobs using the crontab command. For example, crontab -l lists the cron table for the current user, and crontab FILENAME rebuilds the cron table from the text file FILENAME. Maybe it works differently on your server.<br /><br />If no one else has any ideas here, you might try asking in the UBB.threads How Do I? or Installation Assistance forum at Infopop Community.
_________________________
UBB.threads beta tester / threadsdev.com moderator Software consulting services including UBB.threads problem resolution / installs / upgrades / customization.
hmmm, thats strange.<br />i just did the command crontab -l and it still says tjhe "root" bit is there.<br />but i just downloaded the file to check.<br />do i need to re-run something?
well, we're getting somewhere!!<br /><br />this is the report as of this morning<br /><br />usr/local/etc/httpd/htdocs/ubbthreads/cron/php/doexpire.pl: permission denied<br /><br /><br />what does it mean? (apart from that access was denied <img src="/forum/images/graemlins/smile.gif" alt="" /> )
#227239 - 11/05/0211:14 AMRe: 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 am NOT the cron job expert. Somehow I got it working on my server. LOL<br /><br />But, Can you successfully run the file from the command line?<br /><br />I'd check that first... make sure it runs for you. That'll narrow down if it's a permission thing, or a cron job thing.
that doesnt work <img src="/forum/images/graemlins/frown.gif" alt="" /><br />Can't open perl script "/usr/local/etc/httpd/htdocs/ubbthreads/cron/php/doexpire.pl": Permission denied<br />
#227243 - 11/06/0212:54 AMRe: help with CRON pls, namely doexpire.pl
[Re: Luka_dup1]
JoshPet
I type Like navaho
Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
[]how would i run it from command line?<br />whats the command?<br />[/]<br /><br />If you've got telnet or SSH access to the server... you could go into that directory and type doexpire.pl at the prompt to see if you can run it.<br /><br />If not, it's most likely a permissions thing. <br /><br />[]/usr/local/etc/httpd/htdocs/ubbthreads/cron/php/doexpire.pl[/]<br />Actually looking at your command......<br />Are you allowed to have doexpire.pl inside the PHP directory.... in other words... on your server can you run perl scrips outside of the cgi-bin directory.<br /><br />Some hosts don't let Perl scripts run elsewhere.<br /><br />Or should you be running doexpire.php???<br />What file(s) is actually in the /ubbthreads/cron/php directory?
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 />