<?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: Query to fetch schedule run status in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Query-to-fetch-schedule-run-status/m-p/62873#M15907</link>
    <description>Thank you so much for your response.&amp;nbsp;&lt;BR /&gt;This is helpful. Are you please able to help me which table stores details on entrytype, just to get perspective on what different values stand for.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Nupur&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Nupur Sood&lt;BR /&gt;Research Associate&lt;BR /&gt;S&amp;amp;P&lt;BR /&gt;Asia/Kolkata&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Fri, 06 Nov 2020 18:49:00 GMT</pubDate>
    <dc:creator>NupurSood</dc:creator>
    <dc:date>2020-11-06T18:49:00Z</dc:date>
    <item>
      <title>Query to fetch schedule run status</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Query-to-fetch-schedule-run-status/m-p/62870#M15904</link>
      <description>Hello&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Would someone please be able to suggest a query that can be run on Blue Prism SQL server to get the schedule run status. What we are interested in is&amp;nbsp; something like the report in the Scheduler section of control room but via SQL directly.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Nupur Sood&lt;BR /&gt;Research Associate&lt;BR /&gt;S&amp;amp;P&lt;BR /&gt;Asia/Kolkata&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 06 Nov 2020 08:11:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Query-to-fetch-schedule-run-status/m-p/62870#M15904</guid>
      <dc:creator>NupurSood</dc:creator>
      <dc:date>2020-11-06T08:11:00Z</dc:date>
    </item>
    <item>
      <title>RE: Query to fetch schedule run status</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Query-to-fetch-schedule-run-status/m-p/62871#M15905</link>
      <description>Here is one we use to check for schedules that had errors in the previous 24 hours.&lt;BR /&gt;You can modify as you need&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;select s.Name, SLE.TerminationReason, DATEADD(hour,-12,ASL.starttime) as starttime ,DATEADD(hour,-12, ASL.endtime) as endtime&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;from [dbo].[BPAScheduleLogEntry] SLE&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;inner join [dbo].[BPVAnnotatedScheduleLog] ASL&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;on SLE.[schedulelogid] = ASL.[id]&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;inner join [dbo].[BPASchedule] S&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;on S.id = ASL.scheduleid&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;and entrytime &amp;gt;= DATEADD(hour,-24, GETDATE())&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;and terminationreason is not null&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;and entrytype = '5'&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;and endtime is not null&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;order by ASL.starttime&lt;/CODE&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Robin Wylie&lt;BR /&gt;Senior Analyst&lt;BR /&gt;TransAlta&lt;BR /&gt;America/Edmonton&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 06 Nov 2020 15:38:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Query-to-fetch-schedule-run-status/m-p/62871#M15905</guid>
      <dc:creator>robin_wylie</dc:creator>
      <dc:date>2020-11-06T15:38:00Z</dc:date>
    </item>
    <item>
      <title>RE: Query to fetch schedule run status</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Query-to-fetch-schedule-run-status/m-p/62872#M15906</link>
      <description>This should roughly duplicate Blue Prism's view. You can add a where clause or having clause to filter the results, and you can pull the full schedule log out by looking up the id on BPAScheduleLogEntry. This will include deleted schedules in the results.&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;Select &lt;BR /&gt;&amp;nbsp; &amp;nbsp; L.id,
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Case When S.name Is Not Null Then S.name Else S.deletedname End [Name],
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; L.servername,
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Min(Case When E.entrytype = 0 Then E.entrytime Else Null End) [Start_Time],
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Max(Case When E.entrytype = 1 Or E.entrytype = 2 Then E.entrytime Else Null End) [End_Time],
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Min(Case When E.entrytype = 2 Or E.entrytype = 5 Or E.entrytype = 8 Then 1 Else Null End) [Had_Error]
&lt;BR /&gt;From &lt;BR /&gt;&amp;nbsp; &amp;nbsp; BPASchedule S &lt;BR /&gt;&amp;nbsp; &amp;nbsp; Inner Join BPAScheduleLog L On &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; S.id = L.scheduleid &lt;BR /&gt;&amp;nbsp; &amp;nbsp; Inner Join BPAScheduleLogEntry E
		On &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; L.id = E.schedulelogid
&lt;BR /&gt;Group By
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; L.id,
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Case When S.name Is Not Null Then S.name Else S.deletedname End,
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; L.servername​&lt;/CODE&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Nicholas Zejdlik&lt;BR /&gt;RPA Developer&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 06 Nov 2020 15:48:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Query-to-fetch-schedule-run-status/m-p/62872#M15906</guid>
      <dc:creator>NicholasZejdlik</dc:creator>
      <dc:date>2020-11-06T15:48:00Z</dc:date>
    </item>
    <item>
      <title>RE: Query to fetch schedule run status</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Query-to-fetch-schedule-run-status/m-p/62873#M15907</link>
      <description>Thank you so much for your response.&amp;nbsp;&lt;BR /&gt;This is helpful. Are you please able to help me which table stores details on entrytype, just to get perspective on what different values stand for.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Nupur&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Nupur Sood&lt;BR /&gt;Research Associate&lt;BR /&gt;S&amp;amp;P&lt;BR /&gt;Asia/Kolkata&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 06 Nov 2020 18:49:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Query-to-fetch-schedule-run-status/m-p/62873#M15907</guid>
      <dc:creator>NupurSood</dc:creator>
      <dc:date>2020-11-06T18:49:00Z</dc:date>
    </item>
    <item>
      <title>RE: Query to fetch schedule run status</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Query-to-fetch-schedule-run-status/m-p/62874#M15908</link>
      <description>I don't think there are any tables that store details on the entry type, but from what I've been able to ascertain, I think it goes like this:&lt;BR /&gt;0 = Start of schedule&lt;BR /&gt;1 = End of schedule, success&lt;BR /&gt;2 = End of schedule, exception&lt;BR /&gt;3 = Start of task&lt;BR /&gt;4 = End of task, success&lt;BR /&gt;5 = End of task, exception&lt;BR /&gt;6 = Start of session&lt;BR /&gt;7 = End of session, success&lt;BR /&gt;8 = End of session, exception&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Nicholas Zejdlik&lt;BR /&gt;RPA Developer&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 06 Nov 2020 19:13:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Query-to-fetch-schedule-run-status/m-p/62874#M15908</guid>
      <dc:creator>NicholasZejdlik</dc:creator>
      <dc:date>2020-11-06T19:13:00Z</dc:date>
    </item>
  </channel>
</rss>

