Hi Abiram,
As Marco suggests,
you should probably be explicit as to which shell you want to run your scripts. From memory, on Solaris scripts will be run by /usr/bin/sh if you do not explicitly specify anything else. While that should be fine in this case, it is easy to be logged in using a different shell (tcsh, csh, ...) and write a viable script that then fails at deploy time in weird ways.
So, even if you are happy with running using the standard shell, I would still recommend your first line be
#!/usr/bin/sh just so it is explicit to anyone looking at your code that this is what you wish to use.
Script is try to running from user root directoy,
Correct. By default, all cron and at scripts are run from the home directory of the user who owns the crontab or at entry.
I suspect that if you look in the
DebugUpload.log file, you are probably getting a message about the class not being found. I further suspect that the
DebugUpload.log file is in the user's home directory (and I bet that is not where you expected it)
So that then gives a likely fix: Around line 2 or 3 of your script, change to the directory where you really want the script to run. Something like:
If you are still having troubles, then please
tell the details of the errors. There should be something in the
DebugUpload.log that will show what the error is.
Speaking of the
DebugUpload.log file - instead of creating that in the script you are running, why not create it in the crontab entry (and give it a fully qualified path). At the moment I am betting on this file being in the user's home directory, but I am not sure. If the log file was specified using a fully qualified path then we would
know where the file was. Likewise, if the log file was being created from the crontab entry then you would also see any errors in the cron running or any errors in the script that were external to
Java.
Regards, Andrew