Solved

Send email once Scheduled Task is finished

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

When rebooting a vCenters 6.0 and try to connect using vSphere Client we get this issue "Invalid URL: The hostname could not parsed." When we get this error we need to do some changes in the vCenter advanced settings to fix the issue.
Teach the user how to use configure the vCenter Server storage filters Open vSphere Web Client:  Navigate to vCenter Server Advanced Settings: Add the four vCenter Server storage filters: Review the advanced settings: Modify the values of the four v…
Teach the user how to install and configure the vCenter Orchestrator virtual appliance Open vSphere Web Client: Deploy vCenter Orchestrator virtual appliance OVA file: Verify vCenter Orchestrator virtual appliance boots successfully: Connect to the …

803 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