Solved

Get emails from Scheduled task based on exit code

Posted on 2009-04-03
5
507 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
  • 2
  • 2
5 Comments
 
LVL 14

Expert Comment

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

Author Comment

by:navajo26354
Comment Utility
is this windows batch or vb?
0
 
LVL 14

Expert Comment

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

Author Comment

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

Accepted Solution

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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

772 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now