Announcement

Collapse
No announcement yet.

email notification based on script execution results

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • email notification based on script execution results

    HI everybody,

    OS:WIndows 2003 sp2

    I've got a batch script(with output log file) which runs through a scheduled task.

    Now, I would like to receive a email notification based on script execution results

    for example, if script is completed successfully, I should receive an email with subject: "script name" status:OK
    If script fails , so I receive a mail with subject:
    script name status: KO
    and including the log file previously generated.

    concerning email notification, I may use directly local smtp service or any email sender program as blat or etc.
    Anyone could please help me with that?

    Thanks in advance.

  • #2
    Re: email notification based on script execution results

    Depending on how your task is written, you could look for errorlevel changes and base email contents on those.

    You could use schtasks command to look for scheduled task last result code.

    If you use VBScript, CDO is the most easy way to send some email.

    -vP

    Comment

    Working...
    X