locked
NotifyOnStart using the API RRS feed

  • Question

  • I have a script that I am running where I include -

    job.NotifyOnStart = true;

    job.NotifyOnCompletion = true;

    I am not getting the email messages, however, if I submit a job via the HPC GUI and tell it to send me an email message it will.  I was thinking that maybe I need to incorporate the email address, or user somehow in the script to let it know who to send the email to.

    Do I need to do something like this -> job.NotifyOnCompletion = (user's email here)

    Can someone please let me know the proper way to send out the email from within the API?

    Thanks!


    Friday, May 18, 2012 3:03 PM

Answers

  • Hi Craig,

    You don't need sp1, any service pack will work.  You must have an old dll on your dev box, please check the version number of Microsoft.Hpc.Scheduler.dll.

    Michael

    Thursday, May 24, 2012 8:25 PM

All replies

  • job.EmailAddress = <your email>

    Friday, May 18, 2012 5:33 PM
  • Michael, 

    I tried that, but I am getting the dreaded red-line under EmailAddress.  I looked, but I didn't see this property anywhere listed in the help.  Is this a bug, or am I still doing something wrong?

    Friday, May 18, 2012 7:16 PM
  • Did you put you email address in double quotations?

    job.EmailAddress="samplle@sample.com"

    Michael

    Friday, May 18, 2012 7:18 PM
  • yes, yes I did.  Am I missing a reference?  I have the Scheduler.dll, and Scheduler.Properties loaded.
    Friday, May 18, 2012 7:29 PM
  • hmm....looks more like a syntax problem, you may want to check out some c# string usage, i can't figure out without trying it. Maybe you can try @email@sample.com ? (add @ to the front)

    Michael

    Friday, May 18, 2012 7:33 PM
  • That didn't work either.  The error I am getting states 

    Error 1 'Microsoft.Hpc.Scheduler.ISchedulerJob' does not contain a definition for 'EmailAddress' and no extension method 'EmailAddress' accepting a first argument of type 'Microsoft.Hpc.Scheduler.ISchedulerJob' could be found (are you missing a using directive or an assembly reference?)

    Friday, May 18, 2012 7:38 PM
  • Do you have Microsoft.Hpc.Scheduler.dll loaded and Microsoft.Hpc.Scheduler.Scheduler in a using statement?

    Monday, May 21, 2012 4:17 PM
  • yes I do have both.  I have tried a couple different things, but no luck.
    Monday, May 21, 2012 6:03 PM
  • Which version of HPC server are you using?
    Monday, May 21, 2012 6:12 PM
  • Please note in this msdn doc it says "Platform Note: This property is supported only for Windows HPC Server 2008 R2 with Service Pack 1 (SP1)."

    http://msdn.microsoft.com/en-us/library/microsoft.hpc.scheduler.ischedulerjob.emailaddress(v=vs.85)

    Monday, May 21, 2012 6:13 PM
  • HPC 2008 Rev 2 .  The server and client are both version 3.3.3950.0
    Monday, May 21, 2012 6:14 PM
  • I'm trying to clarify the MSDN doc with the team, it seems that this field is only available on SP1 (3.1)

    Let me get back to you when I have an answer.

    Michael

    Monday, May 21, 2012 7:00 PM
  • Hi,

    This field is available for any HPC server >= Sp1.

    You must have an old dll loaded on your dev box, please reinstall the client utilities for 3.3.3950, and make sure your version of Microsoft.Hpc.Scheduler.dll is 3.3.3950

    Monday, May 21, 2012 8:29 PM
  • Michael, 

    While you are working on that I will mention that if I use the GUI Template instead of submitting a job via the API I can get the email to work.  Now I'm really confused.

    Craig

    Monday, May 21, 2012 8:31 PM
  • you shouldn't be, you are probably loading an old dll (maybe from some residue of previous installation?)

    Michael

    Monday, May 21, 2012 8:33 PM
  • Michael, 

    Did you find out for sure that I need to be using SP1 in order to use the "job.EmailAddress=" property?  If this is truly the case do you recommend that I get rid of SP3 and go back to SP1?  I would think the functionality shouldn't be lost as you go up in SP number.  I would hope that if I would go back to SP1 I don't loose any of the other properties that I'm currently using.  What do you think?

    Craig

    Thursday, May 24, 2012 8:23 PM
  • Hi Craig,

    You don't need sp1, any service pack will work.  You must have an old dll on your dev box, please check the version number of Microsoft.Hpc.Scheduler.dll.

    Michael

    Thursday, May 24, 2012 8:25 PM
  • Michael, 

    You were correct.  I uninstalled the older version and put HPC 2008 SDK (SP2) on my machine and it worked as expected.  

    Thank you again for your continued support!

    Craig

    Friday, May 25, 2012 1:06 PM