Solved

Send email once Scheduled Task is finished

Posted on 2008-10-28
4
1,070 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show you how to create an ISO CD-ROM/DVD-ROM image (*.iso), and MD5 checksum signature, for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5). It's a good idea to compare checksums, because many installations fail because of a corr…
In this step by step tutorial with screenshots, we will show you HOW TO: Enable SSH Remote Access on a VMware vSphere Hypervisor 6.5 (ESXi 6.5). This is important if you need to enable SSH remote access for additional troubleshooting of the ESXi hos…
Teach the user how to rename, unmount, delete and upgrade VMFS datastores. Open vSphere Web Client: Rename VMFS and NFS datastores: Upgrade VMFS-3 volume to VMFS-5: Unmount VMFS datastore: Delete a VMFS datastore:
Teach the user how to edit .vmx files to add advanced configuration options Open vSphere Web Client: Edit Settings for a VM: Choose VM Options -> Advanced: Add Configuration Parameters:

821 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