How to refresh a blocks dashboard page

Does anyone know how to refresh a dashboard page via code? Can’t figure it out.

You have to refresh the actual datasets …