Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Setting up scheduled refresh for R script as data source

Hi all,

 

I have created R-Script as a data source (Note: I am not using the "Run as R-Script" feature but the R- Script as a data source itself) in my Power BI desktop file. 

I then published the PBIX file to the Power BI online version (app.powerbi.com). I now want to setup an automatic scheduled refresh for my dashboard. I have installed the Power BI personal gateway as suggested by the article but was not able to setup the scheduling part. Is there any documentation for the same?

 

Thanks,

HV

3 REPLIES 3
v-gizhi-msft
Community Support
Community Support

hi,

 

According to your description, I create a test pbix file and get data from R script.

15.PNG

Then create a visual, publish to Power BI Service.

Then start the personal gateway.

On the Power BI Service setting->dataset pane, it shows:

10.PNG

I start to configure scheduled refresh and it succeeds:

17.PNG

I try to refresh manually and it succeeds:

16.PNG

Above is my test workflow, for your problem, please check follows:

  • Update personal gateway to the latest version
  • Ensure the personal gateway is running on the same machine as R script directory
  • Specify credential for r data source
  • If the data source contains other kinds of sources, you need to specify credential for these data sources as well.

 

There is a solved case to refer to:

https://community.powerbi.com/t5/Power-Query/Refresh-R-Scripts-with-Personal-Gateway/td-p/434177/pag...

 

If you still have questions about it, please for free to let me know.

 

Best Regards,

Giotto Zhi

Anonymous
Not applicable

Capture.PNG

 

Hi @v-gizhi-msft ,

 

Here is the error that I am receiving. I have checked that my gateway and R script are on the same computer. My gateway is udpated. I referred to the post you shared and even switched off the connectors and restarted the gateway.

 

Originally, I was trying to pull data from SQL server using that R script, then manipulating data to create visuals. I even thought may be because of sql server, but I even tested for a simple R script (dataset = iris), I still get the same error. Please recommend.

 

Thanks,

HV

hi,

 

Please pay attention to this link:

https://community.powerbi.com/t5/Issues/Scheduled-refresh-with-R-not-working/idi-p/877818

 

 

Best Regards,

Giotto Zhi

Helpful resources

Announcements
Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.