Automatic dashboard updating on connect.posit.cloud

Hey!

This is my second post. I’m running into another problem. I wrote a script that runs via cron every morning at 7:00 AM, fetches my data via API, and should then update the dashboard. The script runs perfectly at exactly 7:00 AM, and the log file shows that it runs without errors—meaning all data and calculations are performed flawlessly. However, the dashboard doesn’t seem to be updating. I assume something isn’t working in my last section of code. What could be causing this? I can’t find a solution, and even AI is reaching its limits here. Here’s my code snippet for updating the dashboard:

# define data to upload on server
data_for_upload <- c(
  "app.R",
  "www/logo.png",
  "data/samplename1.rds",
  "data/samplename2.rds",
  "data/samplename3.rds",
  "data/samplename4.rds"
)

rsconnect::deployApp(
  appName = "pammys_dashboard_v2",  
  server = "connect.posit.cloud",
  appFiles = data_for_upload
  )

The update fails only in the automatic cron-job, when i run it manually e.g. in the terminal by using

nohup Rscript update_dashboard.R > update_dashboard.log 2>&1 &

it perfectly updates the dashboard. However I dont want to always manually update the dashboard. This takes time and is extremely inefficient.

Could somebody help?

Thanks in advance!

Update: Problem does not persist anymore.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.