Last Run Result Email Alert from Scheduled Task

Hi All,
Ive a newly require need to move 3 files from a local server to a remote server via FTP each evening.
Local server is a Server 2008 box.
I have setup WinSCP to transfer the files over successfully via a Scheduled Task
Now i need alerting!!
Ive setup the email function in Task Scheduler and it does send me an email but a pretty pointless one at that as it doesn't tell you the Last Run Result status code.
So all i know is the job has run but i don't know if with errors etc.
Each morning ill have to FTP to the remote server and manually check the time and date stamps myself to make sure the copy was successful.
Ive checked the event log and it writes an Event ID 201 to the Task Scheduler Event Log and that has all the info i need in the description, but i cant attach that event to my scheduled task as there are lots of 201's for all different scheduled tasks that
run that by the OS.
Anybody know how i can get the last Run Result in the body of the email or the subject line at least - so i know if it is a 0x0 the job has been successul and anything other than 0x0 that there has been a problem.
Any suggestions?
Thanks in advance.

Here is what a failed task looks like.  Note the non-zero result code:  EventID
203 / Level 'Error' / ResultCode=2147942667
Log Name: Microsoft-Windows-TaskScheduler/Operational
Source: Microsoft-Windows-TaskScheduler
Date: 10/26/2013 7:50:22 PM
Event ID: 203
Task Category: Action failed to start
Level: Error
Keywords:
User: SYSTEM
Computer: WTest
Description:
Task Scheduler failed to launch action "C:\Program Files\Acer Incorporated\HID Monitor\HIDMonitor.exe" in instance "{ad897acd-b254-459c-b246-bee11d4b87f2}" of task "\HIDMonitor". Additional Data: Error Value: 2147942667.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Microsoft-Windows-TaskScheduler" Guid="{DE7B24EA-73C8-4A09-985D-5BDADCFA9017}" />
<EventID>203</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>203</Task>
<Opcode>101</Opcode>
<Keywords>0x8000000000000000</Keywords>
<TimeCreated SystemTime="2013-10-26T23:50:22.438999200Z" />
<EventRecordID>230110</EventRecordID>
<Correlation ActivityID="{AD897ACD-B254-459C-B246-BEE11D4B87F2}" />
<Execution ProcessID="768" ThreadID="2632" />
<Channel>Microsoft-Windows-TaskScheduler/Operational</Channel>
<Computer>W8Test</Computer>
<Security UserID="S-1-5-18" />
</System>
<EventData Name="ActionLaunchFailure">
<Data Name="TaskName">\HIDMonitor</Data>
<Data Name="TaskInstanceId">{AD897ACD-B254-459C-B246-BEE11D4B87F2}</Data>
<Data Name="ActionName">C:\Program Files\Acer Incorporated\HID Monitor\HIDMonitor.exe</Data>
<Data Name="ResultCode">2147942667</Data>
</EventData>
</Event>
¯\_(ツ)_/¯

Similar Messages

  • Run Powershell script from Scheduled Task as "NT Authority \ SYSTEM"

    Hello, dear Colleagues.
    Cannot make Powershell script from Scheduled Task as "NT Authority \ System"
    Action: Start a program - 
    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command "C:\script.ps1"
    The matter is that script is working, moreover if to run Task with Domain Account it works too.
    Checked Run with highest privileges, changed "Configure for" field, tried different arguments (-noprofile, -noexit, -executionpolicy bypass, -command, -file,") - no luck.
    Didn't you try to make it work with SYSTEM account?
    Thanks.

    Hi fapq,
    Try this link task schedulers
    Note
    To identify tasks that run with system permissions, use a verbose query (/query/v). In a verbose query display of a system-run task, the Run As User field has a value of NT AUTHORITY\SYSTEM and
    the Logon Mode field has a value of Background only.
    Naveen Basati

  • Scheduling email alert from dashboard

    Hi All
    Is there any way to schedule an email alert from dashboard based on some condition?
    For example if the total no of transactions falls below a certain limit, an email is supposed to be sent to a user.
    Thanks in advance
    Sandeep

    Hi Sandeep,
    Unfortunately, the scheduling feature for dashboards is currently not available but is definitely considered for future releases.
    There are already few requests made on Ideas place:
    https://ideas.sap.com/ct/ct_a_view_idea.bix?c=E827808B-89E8-45A5-BBA9-9A3F6F1DA703&idea_id=B55B2348-DC61-413D-B91C-3B639FA9CBD6
    https://ideas.sap.com/ct/ct_a_view_idea.bix?c=E827808B-89E8-45A5-BBA9-9A3F6F1DA703&idea_id=F775A25C-9B44-4985-A80A-A7E3B828123E
    https://ideas.sap.com/ct/ct_a_view_idea.bix?c=BB5523E4-062F-4420-B35F-0B1F0D4769A9&idea_id=831B8C30-860F-4680-9FA5-F21734F8D08B
    I would highly recommend you submit your votes so this request gets prioritise.
    Regards,
    Jennifer

  • Office Telemetry Agent Last Run Result 0x800700005 and machines not reporting back in the Telemetry Dashboard

    We have had the Office Telemetry Dashboard setup for a while now as part of our Office 2013 evaluation and it currently reports back on 117 Computers which roughly matches up with the number of agents we have deployed. However, I have recently discovered
    that some computers do not show up on the dashboard when searching under either their computer name or username. Having looked locally at these machines they report a Last Run Result code of 0x800700005 on the Task Scheduler. Not exactly sure what this
    means as I know its a fairly generic code. I can run the telemetry dashboard locally on the effected machines and all appears ok. I have looked at the main Telemetry Processor Log file on our server (%windows%\ServiceProfiles\NetworkService\AppData\Local\Temp\dperrorlog.txt)
    and can see there are quite a few machines reporting that Office Telemetry Processor deleted the folder \\ServerName\SharedFolderName\ComputerNameReference because the files in the folder haven't been uploaded for more than 2 hours. I tried googling this error
    but got nothing back.
    The machines in question are running Windows 7 Enterprise SP1, Office 2013 and the telemetry agent is configured through Group Policy. We also have a number of Office 2007 clients
    running the agent but I have not yet checked to see if any of these ones are not reporting back.
    Can anyone help troubleshoot this issue further to try and establish why some machines are not showing up in the dashboard logs. I have gone through the troubleshooting info here http://technet.microsoft.com/en-us/library/jj219431.aspx#tshooting
    but so far can't find a solution.
    Thanks.

    I tried running the agent as admin and it returned a last run result of 0x41301 which I believe means the Task is currently running but its been like this for several days with nothing being reported back yet.
    For all the other agents that appear to be running fine they show up on the dashboard with each non-admin username which is what we need to run reports based on individual users so I cant understand why this would be a permissions problem. The permissions
    on the shared folder were setup using the automated option when installing the telemetry processor on the server. I have tried just adding in one of the problem users to have full control to see if this makes a difference but have not tested this yet.
    Anyone have any tips on troubleshooting the DPErrorLog file? There doesn't appear to be much out there in the way of documentation for this stuff. Is anyone else using the Telemetry Dashboard successfully as part of their Office 2013 evaluation? 
    Thanks.

  • List of values apprear for email alert while scheduling the report

    List of values apprear for email alert while scheduling the report

    Hi,
    Can you please expand on your issue?
    Cheryl

  • EMAIL ALERTS FROM FIOSADMIN@​VERIZON.CO​M

    I've been receiving email alert notifications from [email protected] for every phone call that is received to my Verizon home digial voice number.  The emails are sent to an email address that I've been told is the default email address associated with my account, not my standard email address.  Verizon techs said the problem is caused by Verzion Call Assistant.  My Verizon Call Assistant does not have email alerts activated and their tech supports states that email alerts from Version Call Assistant would be generated from [email protected] and the problem is at verizon.com. 
    This began 3 days ago and I have not accessed any of my verizon accounts or setting in months.
    Anyone else experiencing this problem?

    I put my money on an issue wht the FiOS Digital Voice Account Manager at verizon.com/fiosvoice
    but if need be...... link to the Call assistant software
    https://www22.verizon.com/callassistant/  
    Also... Call Assistant support can be reached at  1-888-483-5156
    best o luck
    Bob Robertson - Lighter Klepto - I steal lighters, not bandwith

  • Allow email alerts from people that are on the DND bypass list

    Is there any way to Allow email alerts from people that are on the DND bypass list, so that those notificvations still come through as expected?  I can get calls and SMS, but not emails.
    Thanks,
    Andrew

    No. Sorry.  So far as I know, SMS messages should be silenced as well. Only calls from those you've opted to allow are permitted through. SMS messages will not sound a notification.

  • Email alert from Solution Manager

    Hi
    I have configured both System and Business Process Monitoring in SAP Solution Manager.
    I can catch all the errors and display them in the graphical view, I can see details and so on.
    Unfortunately I don't receive any email alert from Solution Manager.
    Could somebody provide me a check list to verify where's the problem and why I can't receive email alert?
    Thank you
    Alessia

    Hi Alessia,
    I´d like to help you, but could you plz provide me some more information about your configuration: auto reaction methods, scot, type of monitors etc.
    Dom

  • Dear All, I'm using Cisco ASA 5505 Firewall and I want the email alert from my Firewall if the CPU increase more than 70 %. Is it possible, Please help me. Thanks Vijay

    Dear All,
                         I'm using Cisco ASA 5505 Firewall and I want the email alert from my Firewall if the CPU increase more than 70 %. Is it possible, Please help me.
    Thanks
    Vijay

    Hi Vijay,
    If can be done but you need any network management software. I personally dont think you can ask your ask to send mails. ASA can trigger alert to a SNMP configured server which will intern send mail to you 
    HTH,

  • Sending email alert from SAP Application System

    Hi,
       we have one scenario like we need to send one email alert from application system, if ther is some error in  proxy or any error is ther in SXI_MONITOR of application sytem. Is ther any way to achieve this.
    Regards
    Pradeep P N

    >
    Pradeep P N wrote:
    > Hi,
    >
    >    we have one scenario like we need to send one email alert from application system, if ther is some error in  proxy or any error is ther in SXI_MONITOR of application sytem. Is ther any way to achieve this.
    >
    >
    >
    > Regards
    > Pradeep P N
    for sending mails from application system you can use various FMs -
    http://sapr3.tripod.com/abap011.htm
    http://www.sap-basis-abap.com/abap021.htm
    for XI related you can always utilize alerts

  • Opening Excel Workbook Fails when run from Scheduled Task on Windows Server 2008 Rw

    Hi,
    I have a little vbs script that instantiates the Excel.Application object and then opens a work book to perform some tasks on it. The script runs fine when run from the command line. When I attempt to run it as a scheduled task (it is supposed to update
    data that is pulled from a SQL Server at regular intervals), it fails with the following error:
    Microsoft Office Excel cannot access the file 'c:\test\SampleWorkbook.xlsm'. There are several possible reasons: .....
    The file does exist. The path reported in the error is correct. The account under which the task is running is the same account I use to run it from the command line. User Account Control is not enabled, and the task is set up to run with highest privileges.
    When I run the same script through the Task Scheduler from a Windows Server 2003 machine, it works without issue.
    I was just wondering if somebody on this forum has run into a similar issue in connection with Windows Server 2008 R2 and figured out what the magic trick is to make it work. I'm sure it is rights related, but I haven't quite figured out what which rights
    are missing.
    Thanks in advance for any advice you may have.

    This is truly killing me ... trying to get it working on Windows Server 2012 without success.
    I desperately need to automate running Excel macros in a "headless" environment, that is non-interactive, non-GUI, etc.
    I can get it to work using Excel.Application COM, either via VBScript or Powershell, successfully on many other Windows systems  in our environment - Windows Server 2008 R2, Windows 7 (32-bit), etc.,  -BUT-
    The two servers we built out for running our automation process are Windows Server 2012 (SE) - and it just refuses to run on the 2012 servers - it gives the messages below from VBScript and PowerShell, respectively- 
    I have tried uninstalling and re-installing several different versions of Microsoft Excel (2007 Standard, 2010 Standard, 2010 Professional Plus, 32-bit vs. 64-bit, etc.), but it makes no difference.
    Would be extremely grateful if any one out there has had any success in running Excel automation on Server 2012 in a non-interactive environment that they could share.
    ( I have tried adding the "%windir%\syswow64\config\systemprofile\desktop"
    folder, which did fix the issue for me when testing on Windows Server 2008 R2, but sadly did not resolve it on Windows Server 2012 )
    [VBScript error msg]
    Z:\TestExcelMacro.vbs(35, 1) Microsoft Office Excel: Microsoft Office Excel cannot
    access the file 'Z:\TestExcelMacro.xlsm'. There are several possible reasons:
    • The file name or path does not exist.
    • The file is being used by another program.
    • The workbook you are trying to save has the same name as a currently open work
    [Powershell error msg]
    Exception calling "Add" with "0" argument(s): "Microsoft Office Excel cannot open or save any more documents because th
    ere is not enough available memory or disk space.
     To make more memory available, close workbooks or programs you no longer need.
     To free disk space, delete files you no longer need from the disk you are saving to."
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : ComMethodTargetInvocation
    You cannot call a method on a null-valued expression.
        + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
        + FullyQualifiedErrorId : InvokeMethodOnNull

  • Variable text is blank in emails when using Scheduled Task to email event log notifications

    I am trying to use powershell to email notification when a user account gets locked.  I am running the script from a server 2008 domain controller.
    I have tried multiple scripts and I have the same issue every time.  The script works fine when I run it directly from the powershell command line window.
    However whenever I try running the exact same scripts from an event-triggered scheduled task, the script runs, however any content that generated from a variable is not added to the email.  It is just left blank and ignored.
    I have tried adding lots of permissions including domain administrator group membership to the account  runs the task from and it doesn't include all the expected text unless I run it from the built-in domain administrator account.
    The task runs and the email is sent, but the email is missing all the content generated by variables.
    How can this be fixed?
    Here is an example script.
    $AccountLockOutEvent = Get-EventLog -LogName "Security" -InstanceID 4740 -Newest 1
    $LockedAccount = $($AccountLockOutEvent.ReplacementStrings[0])
    $AccountLockOutEventTime = $AccountLockOutEvent.TimeGenerated
    $AccountLockOutEventMessage = $AccountLockOutEvent.Message
    $messageParameters = @{ 
    Subject = "Account Locked Out: $LockedAccount" 
    Body = "Account $LockedAccount was locked out on $AccountLockOutEventTime.`n`nEvent Details:`n`n$AccountLockOutEventMessage"
    From = "[email protected]
    To = "[email protected]
    SmtpServer = "exch2010.domain.local" 
    Send-MailMessage @messageParameters
    =================================================
    Here is an example of task settings.
    <?xml version="1.0" encoding="UTF-16"?>
    <Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
      <RegistrationInfo>
        <Date>2015-03-25T21:40:28.8095226</Date>
        <Author>DOMAIN\administrator</Author>
      </RegistrationInfo>
      <Triggers>
        <EventTrigger>
          <Enabled>true</Enabled>
          <Subscription>&lt;QueryList&gt;&lt;Query Id="0" Path="Security"&gt;&lt;Select Path="Security"&gt;*[System[Provider[@Name='Microsoft-Windows-Security-Auditing'] and EventID=4740]]&lt;/Select&gt;&lt;/Query&gt;&lt;/QueryList&gt;</Subscription>
        </EventTrigger>
      </Triggers>
      <Principals>
        <Principal id="Author">
          <UserId>DOMAIN\WilliamsD</UserId>
          <LogonType>Password</LogonType>
          <RunLevel>LeastPrivilege</RunLevel>
        </Principal>
      </Principals>
      <Settings>
        <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
        <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
        <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
        <AllowHardTerminate>true</AllowHardTerminate>
        <StartWhenAvailable>false</StartWhenAvailable>
        <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
        <IdleSettings>
          <StopOnIdleEnd>true</StopOnIdleEnd>
          <RestartOnIdle>false</RestartOnIdle>
        </IdleSettings>
        <AllowStartOnDemand>true</AllowStartOnDemand>
        <Enabled>true</Enabled>
        <Hidden>false</Hidden>
        <RunOnlyIfIdle>false</RunOnlyIfIdle>
        <WakeToRun>false</WakeToRun>
        <ExecutionTimeLimit>P3D</ExecutionTimeLimit>
        <Priority>7</Priority>
      </Settings>
      <Actions Context="Author">
        <Exec>
          <Command>powershell.exe</Command>
          <Arguments>-nologo -File "C:\powershell\l2.ps1"</Arguments>
        </Exec>
      </Actions>
    </Task>

    By variable text I mean everything that it generates by using a variable such as the user's name ($LockedAccount)
    and everything else such as $AccountLockOutEventTime and everything else that is generated from
    a variable.
    Nothing like that appears in the email only hard coded text.
    I am not running it remotely.  I am logged directly onto the domain controller and I tried giving
    the account that is used to run the task more and more permissions including domain administrator group membership with the same result.
    When I run the exact same script on the same domain controller locally via the powershell CLI all of the info appears.
    This is the info when the email is generated by running the script directly from the powershell CLI:
    ================================================
    ================================================
    Account BondJ was locked out on 03/26/2015 20:42:18.
    Event Details:
    A user account was locked out.
    Subject:
                    Security ID:                         S-1-5-18
                    Account Name:                 DC1$
                    Account Domain:                            
    DOMAIN
                    Logon ID:                            
    0x3e7
    Account That Was Locked Out:
                    Security ID:                         S-1-5-21-3440879815-2193117124-1719501250-1154
                    Account Name:                 BondJ
    Additional Information:
                    Caller Computer Name:                DC1
    ===================================================
    ====================================================
    Below is the contents of the email when the same script runs via scheduled task trigger using any account I try other than the built-in domain Administrator account.
    =======================================================
    ======================================================
    Account  was locked out on .
    Event Details:
    ===================================================
    Just mostly blank email body with the info above.  All the important information text is missing from the email.

  • Configuring status alerts on scheduled tasks in SCOM 2012 SP1

    I have spent all day looking for helpful documentation on configuring a SCOM alert that will notify on a scheduled task (call it task_1) that has failed to run.
    In event viewer, this status is being reported as Event ID 322. I'd like to report on this.
    Looking for the community's help to list out high level steps on getting this to work. Here's what I've already done:
    imported the YASC MP into SCOM from
    http://blogs.technet.com/b/yasc/archive/2008/04/16/monitoring-scheduled-taks-with-ops-mgr-2007.aspx
    under Authoring>searched for 'task' and found my MP listed under 'scheduled Task (Windows Server 2008 or higher)>Check Task Last Run Status>right click monitor>create a monitor>unit monitor...
    this is where i'm confused...
    the next window to pop up is asking for the type of monitor to create. I'd like to be able to select one that only reports on when the task has failed to run. 
    Has anyone been able to successfully configure this?
    Appreciate the help!

    Creating an alert based on an Event ID is really straightforward and does not request you to import any 3rd party Management pack (you can but you don't have to).
    For rundown of the steps required to accomplish this pls check the following blog:
    http://blogs.msdn.com/b/jjameson/archive/2011/03/18/operations-manager-alerts-for-event-log-errors.aspx
    Let me know if you have follow up question
    Pranav

  • Email alerts from CER

    We just deployed Cisco Emergency responder (ver.7.1.1) and the email alerts are not being sent to the site contacts when an emergency call is placed. I have a vailid SMTP server and sourece ID set up in the CER group and when I go into the OS administration it tells me that "The SMTP service is available" I have looked in the admin guide for trouble shooting email alerts and it dosen't give me much. I have looked through the event logs as well and don't see any failures.  Is there a way to test the email function of CER without generating a call to the PSAP? If this log file that Imay have over looked that will show me the staus or results of emails sent from CER?

    If the SMTP server that you are sending the mail to does not allow relay, you probably won't see an error; The mail will just be dropped.  Does the alert via phone call work?  How about pager?

  • Email Alert from Desktop Administrator

    Can this be done per Supervisor based on queue statistics, such as a call standing in hold for inordinate amount of time? 
    I ask because a manager sent me an email regarding a call which was on hold in queue for 20 mins last night. He received an email that looks like it was from the supervisor from that queue. There is no email step in the script, and I'm not familiar with setting up alerts any other way.
    ex. 
    Subject:               Skill: ECS_After_Hours:    Oldest call in queue is above upper limit
    Description:      From supervisor  Dsmith Skill: ECS_After_Hours:   Oldest call in queue is above upper limit.
    Any help is greatly appreciated.

    I have found where the email is being generated from. 
    Supervisor desktop>Select CSQ>Click Tools>Click Supervisor Desktop Workflow Administrator 
    From there you create and edit your own CSQ email alerts to various management authorities when there is a queue specific issue.

Maybe you are looking for