Q: Email When Transfer Size is not Above 90GBs. I have a job that runs everyday and 91GBs is transferred. On some days the job only transfers 60GBs because a file is locked. Is there a way to send an email when Limagito transfers anything under 90Gbs?
A: Yes this is possible since version v2022.3.25.0. In this option we added some Integer (Int64) Var: psVIA (= Pascal Script Var Integer A).
You’ll need to add some Pascal Script and Rule Event options to your existing transfer rule.
1. Open our ‘Pascal Script’ option:
2. Enable and add the following ‘On Rule Begin’ Pascal Script (this script will set the integer psVIA Var to zero):
Begin // ... add your code here psExitCode := 1; psVIA := 0; End.
3. Enable and add the following ‘On Rule End’ Pascal Script (this script will return an error internally when the total transfered size is not ok):
Const ctMaxSize = 97710505984; // 90 GByte Begin psExitCode := 1; // Debug psLogWrite(1, '', 'End Size: ' + '%VIA'); // Check If psVIA <= ctMaxSize Then Begin psLogWrite(1, '', 'End Size not above 90GBs'); psExitCode := 0; End; End.
4. In the Function setup set ‘Destination Options’ to ‘Destination Memory & Exit Cyclus on Error’:
5. Add a Pascal Script as Destination. If you have multiple Destinations then our Pascal Script must be the last one in the list.
6. Add the following Pascal Script as Destination (this will add the transfered filesize to the psVIA Integer Var):
Begin // ... add your code here psExitCode:= 1; psVIA := psVIA + psFileSize; // Debug psLogWrite(1, '', 'Sum of Bytes: ' + Int64ToStr(psVIA)); End.
7. Open our ‘Rule Events’ option:
8. Select and enable ‘On Pascal Script Error’ event. With this event selected enable ‘Enable Mail’ and setup the Email and SMTP Setup.
9. Received email in case 90GBs were not transfered:
10. RunTime log will also show yout when transfered size was not reached:
#Filetransfer
If you need any info about this ‘Email When Transfer Size’ request, please let us know.
Best regards,
Limagito Team