Thursday, May 31, 2007

Using CRON for Nightly Partition Purges

Ok, so this technically isn't a problem solved, but it is more along the lines of, “Why on earth didn't I think of this sooner!!!” So I'm tooling around the web, looking for something else on Netware, and I came across Netwarefiles.com tech tips site. Tip number 84 gives you the drill to use CRON to do nightly purges on the partitions. Big dope-slap to the forehead, as I would do periodic manual purges to keep the partition space in line.

MYPURGE.NCF:
# nightly purge process for deleted files

#purge files over 180 days old from SYS volume
purge sys:\*.* -q -d=180

#purge files over 180 days old from DATA volume
purge data:\*.* -q -d=180

#purge temp files from SYS volume
purge sys:\*.tmp -q
purge sys:\~*.* -q

#purge temp files from DATA volume
purge data:\*.tmp -q
purge data:\~*.* -q

CRONTAB entry to schedule it:
#purge old deleted files from server as 3:30am
every day
30 03 * * * MYPURGE.NCF