Forum Discussion
Power BI Report refresh based on condition- PBIRS
- 6 years ago
There is a possibility of a bit of work around.
Power BI Report Server creates a refresh schedule in SQL Server Agent job where it is hosted.
Now I think in your scenario you need to create 2 schedules for your report refresh. one that is scheduled other will be on-demand.
Once your stored procedure fails you can disable your current schedule
EXEC msdb.dbo.sp_update_job Anonymous_name='JobName Scheduled',@enabled = 0
and then use this in your trigger in your log table whenever it updates or inserts new status to executes On Demand Job
EXEC dbo.sp_start_job N'JobName On Demand'
to start your on-demand schedule and then enable your scheduled job when it finishes
EXEC msdb.dbo.sp_update_job Anonymous_name='JobName Scheduled',@enabled = 1
There is a possibility of a bit of work around.
Power BI Report Server creates a refresh schedule in SQL Server Agent job where it is hosted.
Now I think in your scenario you need to create 2 schedules for your report refresh. one that is scheduled other will be on-demand.
Once your stored procedure fails you can disable your current schedule
EXEC msdb.dbo.sp_update_job Anonymous_name='JobName Scheduled',@enabled = 0
and then use this in your trigger in your log table whenever it updates or inserts new status to executes On Demand Job
EXEC dbo.sp_start_job N'JobName On Demand'
to start your on-demand schedule and then enable your scheduled job when it finishes
EXEC msdb.dbo.sp_update_job Anonymous_name='JobName Scheduled',@enabled = 1