Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

SSRS - Run multiple Subscriptions one after another once each has completed

$
0
0

I’m hoping someone can help. I’m trying to programmatically run some SSRS subscriptions one after the other. The reports are all long running and consistently fail if triggered at the same time. At the moment we have about four different subscriptions spread out through the day ensuring that they don’t clash. Unfortunately this can waste quite a lot of time. The solution I have for this is to create a subscription that is not scheduled to run on all each of the reports in question and then get one job to trigger each subscription one after the other once each has finished running:

1) One job triggers the first subscription 2) Using a WAITFOR command give a few seconds for the subscription to run. 3) Using WAITFOR command check periodically that the subscription is running (‘Pending’) 4) When the WAITFOR check finds that the report has been sent the job triggers the next subscription and so on....

I know the code to trigger the subscription:

exec [ReportServerWSS].dbo.AddEvent @EventType='SharedSchedule', @EventData='011e83ff-344a-416a-83cb-1a9281e4205b'

I just need to know how to use the WIAITFOR whilst doing a check and then respond to the results of the check.

Many Thanks


Viewing all articles
Browse latest Browse all 10045

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>