<%@ page import="java.sql.*" %> <%@ page import="java.util.*" %> <%@ page import="java.text.*" %> <%@ page import="com.assorted.affiliate.data.*" %> <%@ page import="com.assorted.affiliate.display.*" %> <%@ include file="/jsp/session-handler.jsp" %> AssortedInternet.com - CGI Download Manager - Automation <%@ include file="/ssi/header.html" %>
 
AUTOMATION
 
 
<%@ include file="/ssi/products-menu-v3.html" %>

Automate the Regeneration of your Download Directory

CGI Download Manager has been enhanced and now includes a new module called the: CGI Download Manager Cron Rebuild Module.

The CGI Download Manager Cron Rebuild Module does two things that can be very helpful in keeping your Download directory up to date. These two tasks are:

Task: Description:
Automatic Rebuild of Files Pages As users download files from your files pages, the CGI Download Manager keeps track of the number of downloads. But, the pages themselves will not update their download count until you re-generate the files pages. Previously, you had to do this manually. Now, using the CGI Download Manager Cron Rebuild Module, you can setup this module as a cron job to automatically regenerate the files pages for you.

If your unfamiliar with what exactly "cron" is here is a basic description:

cron is a unix utility that allows you to schedule jobs to run automatically at a certain time or date. Jobs can be scheduled to repeat at certain intervals, or to run just once.

Automated cleanup of old Search Results Files Another feature of the CGI Download Manager Cron Rebuild Module is that it automatically cleansup search results files. After hundreds or thousands of searches, there can be several MB of search results files on the server that are no longer needed. This module also removes these files and saves space on your server.

Setup and Configuration

The Cron Rebuild Module is included in the CGI Download Manager download for all versions beyond v1.70. To setup the Cron Rebuild Module just complete these two steps:

  1. Set the script's permissions to 755 using your FTP program or the following command on the UNIX shell:
    • chmod 755 files-rebuild-cron.cgi

  2. Next, setup a cron job to run the script as frequently as you desire. (We recommend once per day.) The following line is an example that you can add to your crontab file to run the module script once per day:


0 3 * * * /home/username/www/cgi-bin/files-rebuild-cron.cgi > /dev/null 

The above example sets the script to run once per night at 3 am. Note that you will need to specify the full UNIX path of the script in your crontab file. In the above example, that is:

  • /home/username/www/cgi-bin
<%@ include file="/ssi/footer.html" %>