1. EOF tests for the end of file, it does not close the file. You should use FileClose statement instead. 2. Mail queuing can be easily implemented using the following method: Create a directory with name like "Message Queue" Create a background job named "QueueProcessor" that will on "24x7 Scheduler start-up" event (trigger type). This job should be of JAL script based on usage of the DirWaitForUpdate statement (for more info see example script for DirWaitForUpdate in the online help file). The "QueueProcessor" job will monitor the "Message Queue" directory and if a new file is added, it will read the file and send an email message stored in that file. If the emailing succeeds, the file gets deleted; otherwise the job sleeps for some time (Wait statement) and attempts to send email again. This way, you can implement email queuing. Now, every MailSend in other jobs can be replaced with FileSave statement that will create a new file containing desired email details to a new file in the "Message Queue" directory. You decide how you format the file. The easiest probably is to do it like an INI file with Subject, Recipient, Text, etc.. keys. The described method is universal and can be used in other processing that requires some sort of queuing. : My code reads: IniFileGetKey("C:\24x7 : Scheduler\Configuration\24x7settings.ini", "Some Jobs", : "configuration", batchjob) : FileOpen(batchjob, "LineMode", "Read", "", : file_number) : EOF(file_number, end_of_file) : I have ChooseCase statements after opening the file where a specific email : will be sent and the file will be closed with FileClose. : I have used this *.dat file many times and have never encountered this Error : Opening File message before. I have checked the Log Viewer and my mailbox; : it seems that the scheduled job does not send the notification email when : the job has completed because it cannot open the file with the email : addresses (I am using SMTP protocol). : Is there another way to send email notifications apart from MailSend within : the JAL Script? I would like for emails that cannot be sent out : immediately to be put into a queuing system, can 24x7 support this : feature?
|