schtasks.exe sending email notification???
Windows 2008 R2 has the options for sending an email after a task has completed. The only option I can figure out right now is to have the task create an event have have http://www.petri.co.il/how-to-use-eventtriggersexe-to-send-e-mail-based-on-event-ids.htm send out an email but that seems like too many resources and a bit of a hassle. ???How can I schedule this email via schtasks.exe???
August 15th, 2011 5:22pm

Hi, The key of this problem is trigger. The triggers are listed below: l On a schedule l At log on l At startup l On idle l On an event l At task creation/modification l On connection to user session l On disconnect from user session l On workstation lock l On workstation unlock According to the listed trigger, “On an event” is the best option for you. It should be the same method as you found. For more information, please refer to the following Microsoft MSDN article: Task Scheduler 2.0 http://msdn.microsoft.com/en-us/library/bb756979.aspx Regards, Forum Support Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com . Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
August 16th, 2011 8:10am

The event trigger for the task is already known (on a schedule) so the "on event is already known and I know/knew how to do that. One of the tasks I want performed on this schedule is to send an email and I would like task scheduler to send this email. I could write something but that would not be as suitable because I want the end user to be able to see the email info in the task scheduler gui. ???So how do I tell task scheduler to send an email??? cs
August 16th, 2011 3:58pm

I know this may seem like a silly question but it is not. Someone here must have the required experience with Task Scheduler 2.0. ???
Free Windows Admin Tool Kit Click here and download it now
August 17th, 2011 8:59pm

Hi, We could take either of the following steps to send an email: 1. Via Send an e-mail option under Actions Tab. This action sends an e-mail when a task is triggered. In the action settings you specify the e-mail address that the e-mail is from, the e-mail address that the mail will be sent to, the subject of the e-mail, the text in the e-mail message, and optional e-mail attachments. You must also specify the SMTP server that you use to send e-mail from. For more information, please refer to the following link: http://technet.microsoft.com/en-us/library/cc722129.aspx 2. Create a new basic task. Using this method, you just need to follow the Wizard automatically to create the basic task. For more information, please refer to the link: http://msdn.microsoft.com/en-us/library/bb756979.aspx Thanks. Best regards, Kevin NiPlease remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
August 26th, 2011 4:29am

thanks Kevin but I need to do this from the command line. I have pretty well given up on there being a solution for this and am doing something else.
Free Windows Admin Tool Kit Click here and download it now
August 26th, 2011 5:54am

Create the email send function in a vbscript and create the scheduled task to call that script... both can be done programmatically using a Process (from System.Diagnostics in .NET) or just create the task like any other command line task.
November 11th, 2011 12:40am

Create the email send function in a vbscript and create the scheduled task to call that script... both can be done programmatically using a Process (from System.Diagnostics in .NET) or just create the task like any other command line task. Yes...that is what I did. It is not the ideal solution since it add a layer of complexity that I did not want. What is it with MS TaskScheduler and the lack of a full featured commandline for it. Since Windows 2000 (and before?) it has never been administrator friendly? Thanks all for the input.
Free Windows Admin Tool Kit Click here and download it now
November 21st, 2011 1:36pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics