Solved

Send email once Scheduled Task is finished

Posted on 2008-10-28
4
1,065 Views
Last Modified: 2012-05-05
I have a Scheduled Task that runs a XML file that P2Vs a server each night, what Im trying to accomplish to have something in the XML file so when it completes it will email me with something telling me the job completed. It would also be nice to attach the Windows  Scheduled Task log file.

I guess I dont have to use the XML file to send this email if you have any other ideas? It would be nice if Windows had a way to send an mail once the Scheduled Task was finished&. Im not a programmer so this is a tuff task for me.

Here is the XML code running..

<p2v uninstallAgentOnSuccess="0" version="2.2" xmlns="http://www.vmware.com/v2/sysimage/p2v" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/v2/sysimage/p2v p2vJob.xsd" xsi:type="P2VJob">
  <source>
    <liveSpec>
      <creds host="10.2.1.5" password="*******" port="0" username="ns\administrator"/>
    </liveSpec>
  </source>
  <dest>
    <hostedSpec path="\\10.2.1.6\ConverterTemp" password="*******" username="ns\administrator" vmName="nsapp"/>
  </dest>
  <importParams clonePagefile="false" diskType="MONOLITHIC_SPARSE" keepIdentity="false" preallocateDisks="false" preserveDeviceBackingInfo="false" targetProductVersion="PRODUCT_WS_5X">
    <nicMappings preserveNicsInfo="false">
      <nicMapping network="Bridged"/>
    </nicMappings>
    <volumesToClone>
      <volumeCloneInfo newSize="0" resize="false" volumeId="attVol={computer={8d56326b536472341b75b4f61b479869dbeb1967},1}"/>
      <volumeCloneInfo newSize="0" resize="false" volumeId="detVol={computer={8d56326b536472341b75b4f61b479869dbeb1967},2}"/>
    </volumesToClone>
  </importParams>
  <postProcessingParams installTools="false" powerOnVM="false">
    <reconfigParams/>
  </postProcessingParams>
</p2v>

<p2v uninstallAgentOnSuccess="0" version="2.2" xmlns="http://www.vmware.com/v2/sysimage/p2v" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/v2/sysimage/p2v p2vJob.xsd" xsi:type="P2VJob">

  <source>

    <liveSpec>

      <creds host="10.2.1.5" password="*******" port="0" username="ns\administrator"/>

    </liveSpec>

  </source>

  <dest>

    <hostedSpec path="\\10.2.1.6\ConverterTemp" password="*******" username="ns\administrator" vmName="nsapp"/>

  </dest>

  <importParams clonePagefile="false" diskType="MONOLITHIC_SPARSE" keepIdentity="false" preallocateDisks="false" preserveDeviceBackingInfo="false" targetProductVersion="PRODUCT_WS_5X">

    <nicMappings preserveNicsInfo="false">

      <nicMapping network="Bridged"/>

    </nicMappings>

    <volumesToClone>

      <volumeCloneInfo newSize="0" resize="false" volumeId="attVol={computer={8d56326b536472341b75b4f61b479869dbeb1967},1}"/>

      <volumeCloneInfo newSize="0" resize="false" volumeId="detVol={computer={8d56326b536472341b75b4f61b479869dbeb1967},2}"/>

    </volumesToClone>

  </importParams>

  <postProcessingParams installTools="false" powerOnVM="false">

    <reconfigParams/>

  </postProcessingParams>

</p2v>

Open in new window

0
Comment
Question by:ctrunk514
  • 2
  • 2
4 Comments
 
LVL 16

Expert Comment

by:Bryan Butler
ID: 22826198
Seems like the P2V program, or whatever knows when things are "done" would have to send the mail.  You could have the schedulers send an email at a certain amount of time later, when you know the job should be done.  It could attach the log which would show if it actually did complete.  You would need a "sendmail" command line type program to send the email.  (ie no GUI since the scheduler runs commands)
0
 

Accepted Solution

by:
ctrunk514 earned 0 total points
ID: 22831341
No answer to my question.
0
 
LVL 16

Expert Comment

by:Bryan Butler
ID: 22845902
You just posted this.  Did you figure it out?  Please do tell.
0
 

Author Comment

by:ctrunk514
ID: 22845937
Yea, i am useing a Windows PowerShell script and calling the P2V process from inside the PowerShell script

0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

HOW TO: Connect to the VMware vSphere Hypervisor 6.5 (ESXi 6.5) using the vSphere (HTML5 Web) Host Client 6.5, and perform a simple configuration task of adding a new VMFS 6 datastore.
In this article, I will show you HOW TO: Suppress Configuration Issues and Warnings Alert displayed in Summary status for ESXi 6.5 after enabling SSH or ESXi Shell.
Teach the user how to configure vSphere Replication and how to protect and recover VMs Open vSphere Web Client: Verify vsphere Replication is enabled: Enable vSphere Replication for a virtual machine: Verify replicated VM is created: Recover replica…
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now