<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Finding if scheduled SAS job ran successfully in Virtual Machine in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Finding-if-scheduled-SAS-job-ran-successfully-in-Virtual-Machine/m-p/793004#M254108</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How are you scheduling the job?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Typically, the scheduler (LSF or whatever) should make it easy to say "if job fails, then email me" when you set up the job.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But for a rule like "if there are more than 6 error messages," you'll likely need to write your own log scanning to count errors.&amp;nbsp; So either at the end of the job, or in a separate scheduled job, you read in the log (it's just a text file) as data, and parse it to look for error messages (and bad notes and bad warnings) and count them up.&amp;nbsp; If you search lexjansen.com for "log scanner" or "log parser" you should find lots of examples of approaches to log scanning, and emailing as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The setup I use is at the end of every scheduled job, I parse the log and then append a summary record to a joblog.sas7bdat dataset which has the name of the job, the time it ran, the number of errors detected, and other job metadata.&amp;nbsp; And every night I have a job that checks that dataset to make sure every expected job has run, and that all jobs completed without errors.&amp;nbsp; It any errored, it emails me a little report.&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jan 2022 21:34:32 GMT</pubDate>
    <dc:creator>Quentin</dc:creator>
    <dc:date>2022-01-27T21:34:32Z</dc:date>
    <item>
      <title>Finding if scheduled SAS job ran successfully in Virtual Machine</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-if-scheduled-SAS-job-ran-successfully-in-Virtual-Machine/m-p/792996#M254105</link>
      <description>&lt;P&gt;Hi, I am running a scheduled SAS job each day in the VDI (Virtual Desktop) and I would like to know if there is a creative way to notify me (either though email or other) if the daily job ran successful or not.. If there is success then I leave it as is, if it's not then I have to go in and manually re-run it.&amp;nbsp; Perhaps a way that notifies me if there are more then 6 error messages (6 is normal as there is a connection error I always get) then send a notification?&amp;nbsp; Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 21:11:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-if-scheduled-SAS-job-ran-successfully-in-Virtual-Machine/m-p/792996#M254105</guid>
      <dc:creator>podarum</dc:creator>
      <dc:date>2022-01-27T21:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: Finding if scheduled SAS job ran successfully in Virtual Machine</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-if-scheduled-SAS-job-ran-successfully-in-Virtual-Machine/m-p/793004#M254108</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How are you scheduling the job?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Typically, the scheduler (LSF or whatever) should make it easy to say "if job fails, then email me" when you set up the job.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But for a rule like "if there are more than 6 error messages," you'll likely need to write your own log scanning to count errors.&amp;nbsp; So either at the end of the job, or in a separate scheduled job, you read in the log (it's just a text file) as data, and parse it to look for error messages (and bad notes and bad warnings) and count them up.&amp;nbsp; If you search lexjansen.com for "log scanner" or "log parser" you should find lots of examples of approaches to log scanning, and emailing as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The setup I use is at the end of every scheduled job, I parse the log and then append a summary record to a joblog.sas7bdat dataset which has the name of the job, the time it ran, the number of errors detected, and other job metadata.&amp;nbsp; And every night I have a job that checks that dataset to make sure every expected job has run, and that all jobs completed without errors.&amp;nbsp; It any errored, it emails me a little report.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 21:34:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-if-scheduled-SAS-job-ran-successfully-in-Virtual-Machine/m-p/793004#M254108</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2022-01-27T21:34:32Z</dc:date>
    </item>
  </channel>
</rss>

