Solved

Get emails from Scheduled task based on exit code

Posted on 2009-04-03
5
518 Views
Last Modified: 2013-11-30
I have been assigned the task of getting scheduled task to send me a email if the exit code is not 0x0 however i have no clue on how to script it, I know i can use blat to send the email. If anyone can point me in the right direction on how to have a batch or vbscript check the exit status of a scheduled task and send a email please let me know.

I am assuming that the batch of vbscript that will be made will be called by the scheduled task.
0
Comment
Question by:navajo26354
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 14

Expert Comment

by:igor-1965
ID: 24061909
START <your application to run> /WAIT
IF ERRORLEVEL 1 START <your application to send emails about error>
0
 

Author Comment

by:navajo26354
ID: 24062240
is this windows batch or vb?
0
 
LVL 14

Expert Comment

by:igor-1965
ID: 24062381
Windows. Save it as .cmd and schedule task to run it.
0
 

Author Comment

by:navajo26354
ID: 24063142
how can have it check for any error not just lvl 1
0
 
LVL 38

Accepted Solution

by:
Shift-3 earned 500 total points
ID: 24063855
IF ERRORLEVEL 1 will return true if the errorlevel is greater than or equal to 1.  See here for more information.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

688 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