|
Certain features require periodic maintenance functions to be run by the administrator, using the administrative interface. Using scripts that XCENT has provided with XcAuction Pro and xcClassified Pro, you can easily automate these regular tasks and save time in your overall site maintenance. Automating these processes is done in various ways, depending upon the particulars of your site and services offered by your ISP or web host. Most ISP's will allow a means to schedule processes using primarily one of two different techniques. These are outlined in the following sections.
Scheduled Tasks
One option to use for scheduling a task that you wish to automate is to use the included WSH scripts, which will run at a specified time in order to trigger the maintenance functions. These scripts are included in the WSH folder with the application. They can be scheduled to run using any method that allows the execution of WSH scripts at a specific time. The built in Scheduled Tasks feature that is present in Windows ME and later can be used for this. The machine using the included WSH scripts to schedule these tasks must have Microsoft Internet Explorer 5.0 or later installed. The Scheduled Tasks function is normally found in the Control Panel under Settings from your Start Menu. This technique can be used on the web server itself, or on any Internet connected machine. To schedule a task and automate it, you must first find the corresponding WSH file for the task you wish to automate, then edit that WSH file using a plain text editor, such as NotePad. In each of these files is a configuration section with three important settings. The first is your site's URL to the installation of XcAuction or xcCLassified (the gsURL setting). This setting needs to be configured to your site's URL and auction or classified path (i.e. http://www.example.com/auction/). If your site has an SSL certificate installed, and you are scheduling remotely, you may specify HTTPS in the URL to keep all traffic SSL encrypted for the maintenance function. The next two settings are the administrator login and password to your site. These are the gsAdminName, and the gsAdminPassword settings. Set these to the corresponding administrator login and password for your site's administrative interface. Once you save these changes to the file, you can now schedule the task to be run.
Copy the WSH files to the machine that will be scheduling the tasks. This can be the actual web server, but it can be any Internet connected machine. This is possible since these scripts simulate you, as the administrator, logging into your site and running the respective task through the administrative interface. The tasks can actually be scheduled on a remote machine if your ISP does not provide you with any options for scheduling tasks. To add a task, open the Scheduled Tasks applet on the machine you want to use. This is under the Start Menu -> Settings -> Control Panel -> Scheduled Tasks menu. Click on Add Scheduled Task and then Next to begin. The Scheduled Tasks Wizard should now prompt you for the item you want to run. Click the Browse button and locate the WSH file on the machine/server. Once you select the WSH file you want to schedule, you will be asked for a descriptive name and how frequently you want to run the task. You can give it any descriptive name you wish. If this is on your own dedicated machine or server, we recommend leaving it as the default name provided. If you are hosting multiple sites, you might want to prefix the Scheduled Task name with the website name. Next, you can select how often you want to schedule the task. Typically you can choose from Daily, Weekly, or Monthly occurrences.
You do not want to run maintenance functions more often than is necessary. It can add an unnecessary processing burden to your site and may slow your site response time for your end users. For example, most sites do not need to schedule auction closings to occur any more often than a few times per day at most.
When you have completed selecting the recurrence of your Scheduled Tasks, click Next and you will now be allowed to chose the exact time of day you want to schedule the task to run, and how often you wish to repeat it. We suggest trying to pick off-peak times for most maintenance functions. Once you click the Next button, you will be prompted for the account you want to run the script under. If this were on your own machine, typically you would use your administrator login. If the script were scheduled on an ISP's server, this would typically be your login that you use to access the server. Otherwise, your ISP may actually setup a special account for task scheduling. When finished typing in the account to use, click the Next button. You should now see the summary information about the task you just scheduled and provided with a check box to view the Advanced Properties of the task. Check the Advanced Properties box and click Finish. You will now see the property window for the scheduled task with several tabs at the top for modifying any properties of the task. By default, it will probably be set to stop the task if it runs for more than 72 hours. We suggest changing this to two (2) hours and then click OK to save the changes. For additional tasks, repeat the above instructions for each task that you wish to schedule.
The WSH scripts accomplish the following tasks:
- closing expired ads or auction listings
- processing auction or ad watches
- processing emails
- processing price drops in xcAuction
- deleting old, closed listings by date
- deleting unused user images
- renewing user subscriptions
Scheduling URL Triggers on ISP Web Server
Some ISPs may not provide you with an option to schedule tasks, and you may not have an always-on Internet connected machine on which you could schedule them yourself. In that case, if the ISP has a process that can "touch" or "hit" a URL on your site at a scheduled time, you can use an alternate method to schedule these maintenance tasks. In the RunFunctions folder included with the application, there are additional ASP files that can be uploaded to your site. These "RUN" files allow an alternate method to trigger the maintenance functions. When these are uploaded to your site, any attempt to hit the URL the Run file is at, will cause the associated process to run. For example, for xcAuction, there is a file named APRunProcessClosings.ASP. If this file is uploaded into the auction application on your site, any attempt to access that URL will cause the ProcessClosings function to run. If your site was http://www.example.com/auction, and you uploaded the file to the auction folder, the URL would be http://www.example.com/auction/APRunProcessClosings.ASP. You may be able to have your ISP schedule a process on their back end systems that will try to access that URL on a scheduled basis, which will trigger the ProcessClosings function on your site, or you can schedule it on any other server on the Internet. Since these processes can be initiated by anyone who knows the URL to this trigger URL, you may want to rename the file slightly in order to prevent a malicious user from attempting to trigger the functions more often than you need or want.
Since these processes need to be accessible on the Internet they do not share the security features the Scheduled Tasks from the previous section can utilize. For this reason, only those functions that are a little more innocuous are given the run function files.
The RunFunctions scripts accomplish the following tasks:
- closing expired auction listings
- processing auction or ad watches
- processing Auction status emails
- processing price drops in xcAuction
|