From 2cdf616a56c396427505c5518c28c0f782baf930 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Sun, 13 Oct 2002 20:34:33 +0000 Subject: [PATCH] Changed to be configurable from the config file. --- sbin/Hourly/EmptyTrash.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sbin/Hourly/EmptyTrash.pm b/sbin/Hourly/EmptyTrash.pm index 8a800f26c..663d67fa5 100644 --- a/sbin/Hourly/EmptyTrash.pm +++ b/sbin/Hourly/EmptyTrash.pm @@ -14,13 +14,17 @@ package Hourly::EmptyTrash; use strict; +use WebGUI::DateTime; use WebGUI::Operation::Trash; use WebGUI::Session; use WebGUI::SQL; #----------------------------------------- sub process { - WebGUI::Operation::Trash::www_purgeTrashConfirm(); + my @date = WebGUI::DateTime::localtime(); + if ($date[1] == $session{config}{EmptyTrash_day} && $date[4] == 1) { # only occurs at 1am on the day in question. + WebGUI::Operation::Trash::www_purgeTrashConfirm(); + } } 1;