Gossamer Forum
Home : Products : DBMan : Customization :

Auto-Deletion of Records: Stand Alone Script - Cron

Quote Reply
Auto-Deletion of Records: Stand Alone Script - Cron
If anyone is interested in using a stand-alone version of auto-deletion script that can be executed via cron, which was originally written by Alex and JPDeni as a sub-routine to delete records by days specified by Registered Users, please send an email message to eliot@anthrotech.com.

The script/mod is long and it is not conducive to post it in this forum. It can be executed via your web browser or Cron.

If you do want to execute the script via Cron on a UNIX server, here is what you need to do to set-up the cron job:

(I know it may be premature of me to post cron instructions, but rather than repeating myself in the future, people can refer to this Topic.)

1) Download the script into a directory where your DBMAN scripts are located. It is recommended to create another sub-directory below your DBMAN.

2) Create a shell file in your <ROOT> directory. It should look like the following:

Code:
# Delete Records from DBMAN
/path/cgi-bin/dbmandirectory/dir/delads.cgi > /path/cgi-bin/dbmandirectory/dir/delads.log

Change the bolded statements to your correct directory where your delads.cgi file is located. Save this file as delads.sh.

FYI: What this file does is tells the web server that you want to execute the delads.cgi file and create a log file to show successful execution of the script.

3) Then you will have to edit your crontab by doing the following:

a) At your root's command prompt, type the following command line:

Code:
crontab -e

b) Then in your crontab screen, type in the following codes:

Code:
# Delete Records from DBMAN
0 6,12,18 * * * /path/to/root/delads.sh

Change the bolded statement to your root directory path. You can also change the numbers 6,12,18 to other hours that you want to run the cron job.

c) Save the cron job.

Note: You can also run this script on a NT server if you have access to the Windows AT Scheduler program, which is a part of the NT Resource Kit, or another third party scheduler program.

For more information about using cron, there is a nice tutorial written by Bobsie, who is the LINKS Modification Forum Moderator, in the FAQ section of LINKS2 in the Gossamer-Threads Resource Center.

For more information about the auto-deletion script, search for this keyword in the DBMAN Installation Forum.

BTW: My car is not running well, Carol, so I have to postpone my road trip for a few days until I get it fixed. Frown So, I may be in and out of this forum until the car is fixed.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us

[This message has been edited by Eliot (edited August 22, 1999).]

[This message has been edited by Eliot (edited August 22, 1999).]

[This message has been edited by Eliot (edited August 22, 1999).]
Quote Reply
Re: Auto-Deletion of Records: Stand Alone Script - Cron In reply to
The autodelete mod is now completed with also deleting the uploaded files (automaticly) Intersted?? We've finished it yesterday, see the other DBMan forum, 'File Upload...
Quote Reply
Re: Auto-Deletion of Records: Stand Alone Script - Cron In reply to
Great, Mart!

Good job! Didn't see that post. This particular mod I worked on is only for "standard" DBMAN systems. But your mod does not seem to be a stand-alone script. It seems to just be a sub-routine in the db.cgi file. This mod in this Thread is a stand-alone, separate script than the db.cgi.

Wink

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us

[This message has been edited by Eliot (edited August 22, 1999).]
Quote Reply
Re: Auto-Deletion of Records: Stand Alone Script - Cron In reply to
It's just a part of the mod, Carol wrote for me a while ago, together with the Password-cleanup thing, it work by 'cron' and more than perfect...

---------
Mart.
Quote Reply
Re: Auto-Deletion of Records: Stand Alone Script - Cron In reply to
Great! Are you planning on releasing this as a mod in the Resource Center?? Sure would be nice. Also, does the auto-deletion mod work with just standard versions of DBMAN without the File Upload Mod??

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Auto-Deletion of Records: Stand Alone Script - Cron In reply to
All the credits are for Carol, so I will not release anything on the resource center. Maybe its something to place on her Site. For using this mod in the 'standard' version: I thing even with the added rules for deleting the uploaded files, it will work. Only you have to define some variables before in your 'cleanup' script. If your intersted, I will post my whole 'cleanup.pl' script on my site.

-------
Mart.
Quote Reply
Re: Auto-Deletion of Records: Stand Alone Script - Cron In reply to
It may be nice for others to choose which version they want to use. I am just sharing the script I wrote based on the mod written by Alex and Carol. I did state that quite plainly in my first post. Smile

You might want to consider posting an URL where people can find your cleanup script if you are willing to share it with to assist other DBMAN programmers. Smile

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Auto-Deletion of Records: Stand Alone Script - Cron In reply to
OK, but I will first hear from Carol, if she agree with this.

-------
Mart.
Quote Reply
Post deleted by MeltedMonitor In reply to
Quote Reply
Re: Auto-Deletion of Records: Stand Alone Script - Cron In reply to
I've already responded to your duplicate post.

Regards,

Eliot Lee