Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

 

...

Section

 

 

Column

Excerpt

...

Script to cleanup temporary groovy files

Cleanup temporary files produced by running groovy and gant scripts in Confluence.

The Groovy and Gant macros produce temporary groovy class files in

...

the script/temp/groovy

...

 directory in the Confluence home directory. These should be deleted occasionally. It also serves as an example of the gant

...

macro (smile).

...

No Format
{gant} target(default: "Default target") { yesterday = System.currentTimeMillis() - 24*3600*1000 // 24h x 3600 secs/hr x 1000 for milliseconds tempDirectory = "${confluenceHome}/script/temp/groovy" // temp file location println "Cleanup of files in ${tempDirectory}" ant.delete { fileset(dir: tempDirectory) { date(millis: yesterday, when: "before") } } } {gant}

How to use

Example scripts can be used in one of 3 different ways:

Column
width50%
Info
titleView source

cleanupTemp.gant

Info
titleRequirements
  1. SCRP 4.x or above
  2. Confluence 4.1 or above
Info
titleTested

This script (latest version in Bitbucket) is tested during release testing using GINT

Section

Column
No Format
{gant:script=#https://bitbucket.org/bob_swift/examples/raw/tip/confluence/gant/cleanupTemp.gant}
{gant}