Is it possible you need to use absolute paths to the java and date commands? I'd suspect that the PATH in use by Splunk might not include the location of java (date should work as such).
Alternatively perhaps try set -x in the script and watch to output to see what is happening?
Finally, I'm assuming you have execute permissions on the script...
... View more