"andrea azzini" wrote in message
news:vb********************@twister2.libero.it...
: This sounds really interesting, i had not thought about it... but, is
there
: any way to have a script run at an aribitrary time or should i just put it
: into another (frequently accessed) page and let it check whether it's time
: to run or not?
: Remember i am on hosting so i can't do more than edit the files in my
site's
: directory...
I didn't look at Aaron's link but if you cannot get it scheduled, I looked
at it this way. My customer has a menu for administration. This is
separate than maintenance. Administration has two functions.
1. Get orders
2. Cleanup
Get orders will show a list of all order files and they can be viewed,
printed and archived.
Cleanup cleans up all temporary files in the orders file directory that are
3 days or older, based on a value in the config file.
I inform them to run a cleanup at least once when getting orders. My
shopping cart cleans up files when orders are complete and only leaves
successful order files. I cannot determine if someone fails to complete a
shopping experience but I can try to do cleanup with Session_OnEnd. I found
several issues with that approach. So, I chose to just make a generic
routine that cleans up the files. There are 2 files left if the order is
not completed for each shopper. 50 shoppers = 100 files. They are single
digit k byte XML files. 100 files would be less than 1mb. This is only for
unprocessed orders and they are only created if someone leaves something in
their shopping cart and either leaves the site, closes their browser or
times out.
I also didn't want to clean them automatically in case someone was having
trouble and called support. This would give the support person something to
look at so the order could be completed on the phone.
For those who host their own sites, I can offer an automated cleanup, if
desired. Nobody yet has requested this process be automatic since cleanup
takes care of it and only takes seconds at the most.
HTH...
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center -
http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation -
http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library -
http://msdn.microsoft.com/library/default.asp