Hi,
Any thoughts on what's happening here?
I've got a job triggered by the Creation or Rename of a file.
The job contains one task -- run a Powershell script. For the purposes of testing I've winnowed it down to this:
Param ( [string] $inFile )
echo $infile
Get-Date -Format G >> \\VRUKAZCLEGTVR1X\Transfer\360T\Out.txt
echo $infile >> \\VRUKAZCLEGTVR1X\Transfer\360T\Out.tx
[xml]$TradeXML = Get-Content $inFile
$T = $TradeXML.trade
Start-Sleep -s 4The parameter name is inFile, and it's value is {TRIGGER(Active|96f21a20-0584-41e7-a24e-618d6401e109|File.Result.FullPath)}
As you can see, the powershell script writes the path of each file that triggers the job to a file, Out.txt. When I copy (for example) four files:
Trade-7887250.xml
Trade-7887249.xml
Trade-7887234.xml
Trade-7887211.xml
to the input folder, the job gets triggered 4 times (good) but I get this from Out.txt:
8/18/2017 6:28:33 AM
\\VRUKAZCLEGTVR1X\Transfer\360T\Trade-7887234.xml
8/18/2017 6:28:34 AM
\\VRUKAZCLEGTVR1X\Transfer\360T\Trade-7887234.xml
8/18/2017 6:28:34 AM
\\VRUKAZCLEGTVR1X\Transfer\360T\Trade-7887234.xml
8/18/2017 6:28:36 AM
\\VRUKAZCLEGTVR1X\Transfer\360T\Trade-7887234.xml
I.e. I get the same filename 4 times. I've tried various changes to configuration, "Do not Start Job if already runnning", putting a wait at the end of the job, Using polling, etc. but I'm kind of out of options and I find it hard to believe that I can't get something so fundamental working.
I'd love any hints as to where I've gone wrong.
TIA
--Peter
Edited by moderator
2017-08-23T09:41:40Z
|
Reason: Not specified