...
...
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 |
|
...
...
directory in the Confluence home directory. These should be deleted occasionally. It also serves as an example of the gant |
|
...
{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}
macro . |
|
No Format |
---|
How to useExample scripts can be used in one of 3 different ways: |
Column |
---|
| Info |
---|
| - SCRP 4.x or above
- Confluence 4.1 or above
|
Info |
---|
| 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} |
|
|