Hi,
having static file name could cause problems, currently we are testing something similiar and outgoing notification's queue can rise up to 30 messages per second.
Firstly we have used batch file with followed code (code by CA, used in CA Spectrum Integration):
@echo off
for /f "delims=" %%a in ('pdm_perl writeNotifDataToFile.pl') do @set FILE_NAME=%%a
"d:\Program Files (x86)\CA\SC\JRE\1.6.0_30\\bin\java.exe" -DFILE_NAME="%FILE_NAME%" -jar OCNotify.jar
del %FILE_NAME%
But I'm bad in batching so I switched to perl but this code could be a useful example how to generate unique temporary files, pass it to executable and then delete.
Also here is one of my other projects where I have used perl script (Im not good at perl too but as it distributing with CA SDM I think that every SDM admin should use it for their needs ):
use pdm_perlext;
use pdm_misc;
use strict;
use utf8;
use Encode;
binmode(STDOUT, ":utf8");
binmode(STDIN, ":encoding(utf8)");
$summary = $ENV{"NX_NTF_SUMMARY"};
$summary =~ s/[\r\n]+/ /g;
$msg = $ENV{"NX_NTF_MESSAGE"};
$msg =~ s/[\r\n]+/ /g;
$email = $ENV{"NX_NTF_EMAIL_ADDRESS"};
my $appPath = "\"D:\\Program Files (x86)\\CA\\Service Desk Manager\\site\\mods\\integration\\someapp.exe\"";
my $javaCmd = $appPath . " -email $email -msg $msg -summary $summary";
my $out = `$javaCmd`;
Hope this example helps you to build stable solution for your needs.
Regards,
cdtj