| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Cron for Html Catalog Generation? | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
Cron for Html Catalog Generation?
Anyone want to give me a starting point to set up a cron job to run the html catalog? I don't know how to call the script.
Would be a big help... |
|||||||||
#2
|
|||||||||
|
|||||||||
Re: Cron for Html Catalog Generation?
Quote:
Here is the line we are using: 05 02 * * * cd /home/path_to_your_account/x-cart/admin; /usr/local/bin/php -q -f html_catalog.php You'll need to comment out this line: Code:
|
|||||||||
|
#3
|
|||||||||
|
|||||||||
Thank you Anton. You rock as usual.
|
|||||||||
#4
|
|||||||
|
|||||||
Any idea how to pass a variable from the commandline via a cronjob?
I would prefer to have an IF clause that disregards the security.php line if passed a variable instead of commenting it out. I have tried this before, but can't seem to get it working. Thanks!
__________________
X-Cart Pro 4.5.5 Platinum X-Payments 1.0.6 PHP 5.3.14 MySQL 5.1.68 Apache 2.2.23 |
|||||||
#5
|
|||||||
|
|||||||
Also, will there be any problems if a link to the HTML catalog is already available on the main site page?
__________________
X-Cart Pro 4.5.5 Platinum X-Payments 1.0.6 PHP 5.3.14 MySQL 5.1.68 Apache 2.2.23 |
|||||||
#6
|
|||||||||
|
|||||||||
Perhaps make a copy of the php file, remove the security.php include, use full paths to everything, and then tuck the file below directory root?
|
|||||||||
#7
|
|||||||
|
|||||||
Tried using 27stars post but I soon discovered it wasn't actually creating the catalog, but merely loading the page. Learned this from trying to run the HTML catalog script from the commandline...all that happened was that the html code for that page loaded. So I adapted the code a little and here is what we are using.
Replaced: Code:
With: Code:
Use the cron (or something similar): Code:
Please note that your PHP setup must have argv registered. If it doesn't, you can add php_value register_argc_argv 1 to your .htaccess file to enable it.
__________________
X-Cart Pro 4.5.5 Platinum X-Payments 1.0.6 PHP 5.3.14 MySQL 5.1.68 Apache 2.2.23 |
|||||||
#8
|
|||||||||
|
|||||||||
Quote:
Sorry, forgot to mention you have to remove a couple of "if" statements and rename the script to use it as cron - we use a custom cron generator to put pages in root. but your solution looks good. I did see the code for auto identification of script running in shell, so you do not have to pass any variables at all. If you need it, try to search for cron db_backup.php in this forum. |
|||||||||
#9
|
|||||||
|
|||||||
For some reason the HTML catalog is creating hundreds of sessionids. We are at 790 and climbing rapidly. I do not know if this is from running it as a cronjob or what.
Anyone else experienced this??
__________________
X-Cart Pro 4.5.5 Platinum X-Payments 1.0.6 PHP 5.3.14 MySQL 5.1.68 Apache 2.2.23 |
|||||||
#10
|
|||||||||
|
|||||||||
For anyone that is interested, Garry from X-Cart Plus whipped me up some 3.4 and 3.5 HTML Cron Scripts that are a dream to setup and run. He charged a fair price for something that makes your life much easier.
You can PM GarryHS here. |
|||||||||
|
|||
X-Cart forums © 2001-2020
|