Quote:
Originally Posted by odie3
Ok, I am trying to setup my cron job but the email i am getting back is:
Status: 500 Internal Server Error
X-Powered-By: PHP/5.2.17
Content-type: text/html
Not sure if I have my host site/cron setup properly (the path) but I think I do.
Looks like my path is correct, there is a php error log that is growing in the \cron\ directory
|
you shouldn't access the tsxview cron script directly, but the vbulletin cron.php file located in the forum root dir.
Important keywords marked in
bold:
Quote:
CRON JOBS
=========
To make the uptime logger work properly and keep the viewers up to date every time a user refreshes the
page, you need to add a cron job to your webserver.
This can happen in multiple ways, so pick the right one for your environment:
- You own a Root server or a VPS and have shell access to the console:
Great! the only thing you need to do is to add a cron entry to the crontab as root or your web user.
You can access the crontab by entering 'crontab -e' with your favourite text editor.
Then you need to paste the following line after you entered the correct values:
*/5 * * * * /usr/bin/php5 /var/www/htdocs/forum/cron.php >/dev/null 2>&1
What it does:
The first 5 columns define the time the cron entry should be executed (you may check google for the
according crontab syntax if you're unsure), the 6th column defines the binary, which should be your
php bin file. In my example I located the php bin in /usr/bin/php5, you have to check for your correct
bin file, ask your admin/hoster for assistance if you're unsure.
The 7th column is the absolute path to the cron.php located in your vbulletin root directory.
The last parts separated with a space (not a tab) tells the crontab to hide all output from the php parser
- You are on a VPS or a hosting, but have access to an admin Panel where you can add cron entries (or Sheduled Tasks)
Depending on how exactly the crontabs are managed, you might be able to enter a term like the example
above or you need to specify one line for execution.
PLESK for example uses "Sheduled Tasks" for specific domains.
In the Minute Field, you use "*/5", Hour, DoM, Month, DoW: "*"
Command: "/usr/bin/php5 -f "/var/www/htdocs/forum/cron.php"
The command has to be adapted to your server environment, especially the path to the php binary and the
path to your cron.php located in the forum root dir.
Ask your admin/hoster for assistance if you're unsure or use a different administration tool
- You don't have access to any of that or don't want or can't define a sheduled task:
No worries, the addon will work anyway. However there are 2 things you should be aware of:
Because of the vbulletin's style of running cronjobs, in the case that you had no user visiting your
forum for more than 10 minutes, the viewer will not update until the page is refreshed again.
This is because the update is called AFTER the page has been loaded for the user.
Second: The uptime logger may not work properly, because the script doesn't update every 10 minutes,
but at least 10 minutes from the last page load.
|