Re: cron script for housekeeping and running WebCatalog?
This WebDNA talk-list message is from 1999
It keeps the original formatting.
numero = 25711
interpreted = N
texte = Grant,I am not an expert in anything here, but when I made a plea for a script to keepwebcat up on Linux, Clement Ross kindly provided me with these 2 emails. Iunderstand little of them, but my Linux server admin installed no problem and I seefor myself that if I crash webcat it reboots within a couple minutes or less :-) Ifthese do not work with OSX, then I just displayed the depth of my ignorance...sorry.As for the shopping carts that won't delete... I had a site (on mac/web*) that useda [purchase] tag which did create the order file in the Orders folder, but did notdump the dupe in the ShoppingCarts folder so I just used [DELETEFILEfile=ShoppingCarts/[cart]] ..In case you situation is similar.Enjoy your break!-John******Here is what I do. In the /etc/cron.daily directory I have a scriptwith the following content:#!/bin/sh/etc/rc.d/init.d/WebCatalogCtl restartThe script name is not important. I run RH6.1 which installs acrontab that runs any script in /etc/cron.daily everyday at around4AM.WebCatalogCtl uses kill -2 which is normally catch by theapplication so that it can terminate gracefully, but, better safethan sorry and make sure your databases are commited.I also have a modified WebCatalogCtl script that runs every minutealso with cron. The only modif I made was removing the WebCatalogalready running message so that I don't get emailed everytime thescript is run.WebCat crashing 4 times in the last 2 weeks has prompted me to dothose scripts.Clem.*****I typed that e-mail just after I did the scripts. A couple of hourslater, WC crashed and the script that runs every minute did it'sthing. But, Apache was still confused and could not talk to WC so Iadded a line to restart the web server as well (it takes 2-3 sec. sowhat the heck!).So here is part of the modified WebCatalogCtl i run every minute:case $1 in'start') if [ $RUNNING -eq 0 ]; then if [ -f $WEB/WebCatalog ]; then cd $WEB $WEB/WebCatalog& /etc/rc.d/init.d/httpsd restart echo $WEB/WebCatalog is started else echo $WEB/WebCatalog is not exist fi fi exit 0 ;;Enjoy!Clem.Grant Hulbert wrote:> Hello unix and OSX experts!>> I am about to head out on vacation (my first in 5 years; one of the> perks of being a larger corporation now), and one of my customers is> having two problems with OSX WebCatalog.>> 1) Shopping carts in one store are building up and never deleting> 2) WebCatalog occasionally quits>> Since I am no expert in unix, and my unix engineer is out on family> leave, I'm asking those experts on this list to help me out. Can you> recommend a script (perhaps cron) that will solve these 2 problems?> Obivously we want to fix any bugs that might be involved, but in the> meantime we're looking for workarounds.>> Thanks in advance; you guys are the best!>> Grant Hulbert , Director of R & D **********************************> Smith Micro, Internet Solutions Div | Formerly, Pacific Coast Software> 16855 West Bernardo Drive | -------------------------> Suite 380 | eCommerce (WebCatalog)> San Diego, CA 92127 | Software & Site Development> 858.675.1106 | http://www.smithmicro.com> 858.675.0372 (fax) **********************************>> #############################################################> This message is sent to you because you are subscribed to> the mailing list
.> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > To switch to the INDEX mode, E-mail to > Send administrative queries to #############################################################This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to To switch to the INDEX mode, E-mail to Send administrative queries to
Associated Messages, from the most recent to the oldest:
Grant,I am not an expert in anything here, but when I made a plea for a script to keepwebcat up on Linux, Clement Ross kindly provided me with these 2 emails. Iunderstand little of them, but my Linux server admin installed no problem and I seefor myself that if I crash webcat it reboots within a couple minutes or less :-) Ifthese do not work with OSX, then I just displayed the depth of my ignorance...sorry.As for the shopping carts that won't delete... I had a site (on mac/web*) that useda [purchase] tag which did create the order file in the Orders folder, but did notdump the dupe in the ShoppingCarts folder so I just used [DELETEFILEfile=ShoppingCarts/[cart]] ..In case you situation is similar.Enjoy your break!-John******Here is what I do. In the /etc/cron.daily directory I have a scriptwith the following content:#!/bin/sh/etc/rc.d/init.d/WebCatalogCtl restartThe script name is not important. I run RH6.1 which installs acrontab that runs any script in /etc/cron.daily everyday at around4AM.WebCatalogCtl uses kill -2 which is normally catch by theapplication so that it can terminate gracefully, but, better safethan sorry and make sure your databases are commited.I also have a modified WebCatalogCtl script that runs every minutealso with cron. The only modif I made was removing the WebCatalogalready running message so that I don't get emailed everytime thescript is run.WebCat crashing 4 times in the last 2 weeks has prompted me to dothose scripts.Clem.*****I typed that e-mail just after I did the scripts. A couple of hourslater, WC crashed and the script that runs every minute did it'sthing. But, Apache was still confused and could not talk to WC so Iadded a line to restart the web server as well (it takes 2-3 sec. sowhat the heck!).So here is part of the modified WebCatalogCtl i run every minute:case $1 in'start') if [ $RUNNING -eq 0 ]; then if [ -f $WEB/WebCatalog ]; then cd $WEB $WEB/WebCatalog& /etc/rc.d/init.d/httpsd restart echo $WEB/WebCatalog is started else echo $WEB/WebCatalog is not exist fi fi exit 0 ;;Enjoy!Clem.Grant Hulbert wrote:> Hello unix and OSX experts!>> I am about to head out on vacation (my first in 5 years; one of the> perks of being a larger corporation now), and one of my customers is> having two problems with OSX WebCatalog.>> 1) Shopping carts in one store are building up and never deleting> 2) WebCatalog occasionally quits>> Since I am no expert in unix, and my unix engineer is out on family> leave, I'm asking those experts on this list to help me out. Can you> recommend a script (perhaps cron) that will solve these 2 problems?> Obivously we want to fix any bugs that might be involved, but in the> meantime we're looking for workarounds.>> Thanks in advance; you guys are the best!>> Grant Hulbert , Director of R & D **********************************> Smith Micro, Internet Solutions Div | Formerly, Pacific Coast Software> 16855 West Bernardo Drive | -------------------------> Suite 380 | eCommerce (WebCatalog)> San Diego, CA 92127 | Software & Site Development> 858.675.1106 | http://www.smithmicro.com> 858.675.0372 (fax) **********************************>> #############################################################> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > To switch to the INDEX mode, E-mail to > Send administrative queries to #############################################################This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to To switch to the INDEX mode, E-mail to Send administrative queries to
John Butler
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
[WebDNA] Problem running Webdna (2011)
Grant, please help me ... (1997)
Multiple Passwords (1997)
Bad Cookie (1998)
includes and cart numbers (1997)
_ in front of field name (1998)
missing records (1998)
Displaying Location (1997)
A little syntax help (1997)
LOOP and IF statements (1997)
Car Database (2002)
(1997)
WebCat b15 Mac plug-in (1997)
Re:Variable Math (1998)
Emailer setup (1997)
[WebDNA] generic Ajax question: storing a variable site-wide (2009)
Pulling Javascript from a DB (2004)
Question about replacing words (1998)
can you reassign loop index? (1998)
More on the email templates (1997)