Re: Running unix shell script from remote java app



Thanks everyone for you help, after sitting down and fighting my was
through unix scripts and unix shell tutorials, - and a lot of input
from a co-worker (with plenty unix skillls) - The problem is solved.

The following lines were added to the ksh script which sets up
everything I needed. (Sorry. had to Add XXXXX for confidentiallity
purposes)


.. /etc/profile
XX_HOME=/app/xxx/product/2.6
XXXXXX_BASE=/app/xxxx
MMO_HOME=/app/xx/xxxx/2.6
.. ${XX_HOME}/bin/shell_profile
.. /app/xxxx/product/2.6/src/scripts/xxxenv prd ds
.. ${MMO_HOME}/bin/mmo-env


Martin: I have thought about scheduling the report to run automatically
- on batch completion), and as a cronjob- Client restriction will not
allow us to add a cron job.
The the java app will be used to run many scripts in the near future as
his responsibilities increase, not necessarily only the report, which
is why I dont want to just schedule it the batch, at certain times the
report may also be needed to run Ad-hoc.

Thanks again everyone.

Cheers
Mike





Martin Gregorie wrote:
mwmann wrote:
>
The reason for the the java app is 2 fold, the unix box is a clients
machine, and we are not able to create or get them to create individual
user accounts, we have one (powerfull) user account for the company.


This particular app was built to basically run a script which generates
a report of errors, runtimes etc, of a clients overnight batch run.

Why not automatically run the script, either as the final task in the
overnight run or later as a cron job, and have it e-mail you the report?

Making a script send e-mail is easy and by doing it that way you don't
have to worry about giving the juniors access to the client system OR
about them forgetting to create the report.

If you're worried about security, it should be easy enough to encrypt
the report and attach it to the e-mail.

So this java app will also be used to automatically schedule/generate
this report.

*nixes already have a scheduler (see above), so why reinvent that
particular wheel. You have a choice of scheduler: cron for jobs that
always run at the scheduled interval and "at", that a process can use to
schedule a following job.


--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |

.



Relevant Pages

  • looking for DOS-UNIX-Mac file detector
    ... report whether the file has Unix line endings, ... want it to detect and report whether its newlines are for Unix, ... I could probably script this, but if something has already been ...
    (comp.unix.shell)
  • Re: Package Distribution Point Updates
    ... You should be able to script the packages that have refresh enabled, ... reporting the schedule should be feasible in the script as well. ... I know you can generate a report showing the ...
    (microsoft.public.sms.admin)
  • attachment email script problem
    ... We have been using the below script to auto email some reports from UNIX to ... The 1st section would include that particular report as the body of the ... email and the other 2 reports as attachments. ... It goes to people who are on PCs and NCD Unix terminals. ...
    (comp.lang.perl.misc)
  • Re: Removing Rows for Printing
    ... One is to clear a sheet of all input cells leaving ... .PrintOut ' for testing use .PrintPreview ... I attached the script to the Print Button. ... I hid the Report worksheet. ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Removing Rows for Printing
    ... I attached the script to the Print Button. ... I hid the Report worksheet. ... Change PrintPreview to Printout in the code if it is working OK ... Also each cell in Col A26 through 58 has a border, ...
    (microsoft.public.excel.worksheet.functions)