Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Get emails from Scheduled task based on exit code

Posted on 2009-04-03
Medium Priority
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.
Question by:navajo26354
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
LVL 14

Expert Comment

ID: 24061909
START <your application to run> /WAIT
IF ERRORLEVEL 1 START <your application to send emails about error>

Author Comment

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

Expert Comment

ID: 24062381
Windows. Save it as .cmd and schedule task to run it.

Author Comment

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

Accepted Solution

Shift-3 earned 2000 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.

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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 …
Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

604 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