The cleanup.sh script doesn’t work when being executed from the cron tab. When it is executed manually, the files get cleaned up normally as expected.
This is caused by the script picking up an incorrect JAVA_HOME or PATH if there are multiple versions of Java installed.
There are three possible solutions to this problem. The first should be to remove the old versions of Java and update both the PATH and JAVA_HOME variable to ensure that the right value gets picked up. If this still doesn’t address it, one can use either of the following solutions.
The cron job would look like the following:
$ crontab -l
* * * * * /../../../cleanup.sh
pushd dirname $0 > /dev/null
In the two methods above, you have to modify the /PATH_TO_JAVA_HOME value to the actual path of the most updated Java installation.
This article applies to all versions of Appian using Linux as the OS.
Last Reviewed: February 2017
© 2022 Appian. All rights reserved.