diff --git a/system/cache/providers/CacheBoxProvider.cfc b/system/cache/providers/CacheBoxProvider.cfc index 827818b17..08d49f8d5 100644 --- a/system/cache/providers/CacheBoxProvider.cfc +++ b/system/cache/providers/CacheBoxProvider.cfc @@ -137,12 +137,17 @@ component // Configure the reaping scheduled task variables.cacheFactory .getTaskScheduler() - .newSchedule( this, "reap" ) + .newTask( + name : "cachebox-reap-#getName()#", + task : this, + method: "reap" + ) + .inMinutes() .delay( getConfiguration().reapFrequency ) // Don't start immediately, give it a breathing room .spacedDelay( getConfiguration().reapFrequency ) // Runs again, after this spaced delay once each reap finalizes - .inMinutes() .start(); - variables.logger.info( "Reaping scheduled task started for #getName()# cache." ); + + variables.logger.info( "Reaping scheduled task started for (#getName()#) every (#getConfiguration().reapFrequency#) minutes" ); // startup message variables.logger.info( "CacheBox Cache: #getName()# has been initialized successfully for operation" ); diff --git a/system/logging/appenders/RollingFileAppender.cfc b/system/logging/appenders/RollingFileAppender.cfc index bcf6dde54..f254bf462 100644 --- a/system/logging/appenders/RollingFileAppender.cfc +++ b/system/logging/appenders/RollingFileAppender.cfc @@ -53,15 +53,22 @@ component accessors="true" extends="coldbox.system.logging.appenders.FileAppende variables.logbox .getTaskScheduler() - .newSchedule( this, "logRotation" ) - .delay( 1 ) // Don't start immediately, give it a breathing room - .spacedDelay( 1 ) // Runs again, after this spaced delay once each reap finalizes + .newTask( + name : "file-appender-#getName()#-log-rotation", + task : this, + method: "logRotation" + ) .inMinutes() + .delay( 5 ) // Don't start immediately, give it a breathing room + .spacedDelay( 1 ) // Runs again, after this spaced delay once each reap finalizes .start(); return this; } + /** + * Rotate the log files + */ function logRotation(){ try { variables.fileRotator.checkRotation( this );