Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
March 16, 2010, 02:59:28 PM

Pages: [1]   Go Down
  Print  
Author Topic: Need Help With Cron Job ...please!!!  (Read 320 times)
Earthson
Intergalactic Superstar
*****
Offline Offline

Posts: 133



WWW
« on: November 18, 2008, 08:55:52 PM »

So, I have built a new website with Joomla 1.5.  http://www.bumbleleaf.com .  I have a component (Feed2Post) which collects rss feeds and, along with my template, creates a news-style website.  Right now, I just need to login to my admin area and click "Post all".  That will grab all new stories and post them to the site.  This is fine, but there is a better, more "hands-off" option that I really want to take advantage of:  complete automation via Cronjobs.  This will automatically collect the stories AND publish them...and that would be SWEET  Happy Happy Joy Joy

So, the program comes with an install guide for the cronjob, but it is beyond my VERY limited knowledge/capability with Cronjobs.  I am hoping someone here can walk me through it.

Here are the instructions:

NEW cronjob tool software
Version 2.0

To setup this new cronjob, all you need to do is:
1.- Upload the zip file to the server and unpack it on a folder (any of your choice). I understand
2.- edit the config.php file, set the $joomladir varialbe to the full path to the
joomla instalation folder, (Same as $mosConfig_absolute_path or joomla 1.5 equivalent),
then set the $joomlaversion variable to 10 or 15 depending if you have joomla 1.0.x
(put 10) or joomla 1.5.x (put 15). I need help with the path

After editing and adjusting, save the file and you're ready to go.

To run the cronjob you need to make php parse the file cronjob.php inside the
cronjob folder that you created.  No idea?!  How do I make 'php parse the cronjob.php'?

When you have configured the cronjob tool, you need to set a cron task at your
hosting server, there are several ways to do this, you need to ask your hosting
support to get the actual cron execution syntax.  Obviously through cPanel, but can someone walk me through it please?

E.G.: /usr/bin/php /path/to/cronjob.php (on some servers)
E.G.: GET http://www.myserver.com/myfolders/to/cronjob.ph  (on some others)
E.G.: lynx -source http://www.myserver.com/myfolders/to/cronjob.ph  (on some others)

and so on, to create the task if you don't know what format you need, ask your hosting
support on which format is the one that works.


Thanks in advance for anyone out there who can save me some serious frustration,

Ryan

« Last Edit: November 19, 2008, 03:38:01 PM by Earthson » Logged

Earthson
Intergalactic Superstar
*****
Offline Offline

Posts: 133



WWW
« Reply #1 on: November 19, 2008, 09:14:21 PM »

Ok, I have figured it out after some Q&A with SUPPORT and then a little trial and error.  But, in the email I receive after the cron executes, I get a bunch of error messages before the actual message.  Can anyone help me out with this?

X-Powered-By: PHP/4.4.9
Set-Cookie: 2c549304c438e44458be810da57a4392=ca16e3dc26361f742956e99bd5cfd2bf; path=/
P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"
Content-type: text/html

Cronjob v2.0 Starting job at: 11/19/2008 21:09:01<br/>
<br />
<b>Warning</b>:  rawurlencode() expects parameter 1 to be string, object given in <b>/home/username/public_html/sitename/administrator/components/com_feedpost/utilities.php</b> on line <b>141</b><br />
<br />
<b>Warning</b>:  rawurlencode() expects parameter 1 to be string, object given in <b>/home/username/public_html/sitename/administrator/components/com_feedpost/utilities.php</b> on line <b>141</b><br />
<br />
<b>Warning</b>:  rawurlencode() expects parameter 1 to be string, object given in <b>/home/username/public_html/sitename/administrator/components/com_feedpost/utilities.php</b> on line <b>141</b><br />
<br />
<b>Warning</b>:  rawurlencode() expects parameter 1 to be string, object given in <b>/home/username/public_html/sitename/administrator/components/com_feedpost/utilities.php</b> on line <b>141</b><br />
<br />
<b>Warning</b>:  rawurlencode() expects parameter 1 to be string, object given in <b>/home/username/public_html/sitename/administrator/components/com_feedpost/utilities.php</b> on line <b>141</b><br />
<br />
<b>Warning</b>:  rawurlencode() expects parameter 1 to be string, object given in <b>/home/username/public_html/sitename/administrator/components/com_feedpost/utilities.php</b> on line <b>141</b><br />
<br />
<b>Warning</b>:  rawurlencode() expects parameter 1 to be string, object given in <b>/home/username/public_html/sitename/administrator/components/com_feedpost/utilities.php</b> on line <b>141</b><br />
<br />
<b>Warning</b>:  rawurlencode() expects parameter 1 to be string, object given in <b>/home/username/public_html/sitename/administrator/components/com_feedpost/utilities.php</b> on line <b>141</b><br />
<br />
Processing: BBC - World
Saved: 5 items
<br>
Processing: BBC - Technology
Saved: 0 items
<br>
Processing: BBC - Health
Saved: 0 items
<br>
Processing: BBC - Entertainment
Saved: 2 items
<br>
Processing: You Tube Videos
Saved: 5 items
<br>
Processing: BBC - Front Page
Saved: 2 items
<br>
Processing: Perez Hilton
Saved: 0 items
<br>
Processing: The Laughable News
Saved: 0 items
<br>
Ended job at: 11/19/2008 20:16:21<br/>
Logged

MrPhil
Professor in Nanotechnology
*****
Offline Offline

Posts: 4595



« Reply #2 on: November 21, 2008, 09:36:30 AM »

1) Are you using the -q flag on the command line? It should silence some of the extra stuff you're getting.

php -q /home/account/public_html/dir structure/file you run.php parm(s)

2) As for the specific error messages about "rawurlencode() expects parameter 1 to be string, object given in...", I'm not familiar with Joomla, but I'd look at three things:

a) you're running the correct version of PHP for this application (does it require PHP 5?). If so, you need to specify the PHP 5 executable on the command line (find out where it is, first). Cron would most likely be defaulting to PHP 4.
b) you have the right version information in your configuration (10 or 15, per your first note)
c) you didn't omit quotes '' or "" around some piece of information when editing your configuration

Beyond that, I don't think it's a cron problem (since you are running the script now), but something in your configuration.
Logged

Pages: [1]   Go Up
  Print  
 
Jump to: