The view can be refreshed in 2011 in an unsupported manner, so this code may not work in 2013 and may break with some update rollups.
The anonymous function must be in an library that is referenced by a ribbon button; there are no events or Xrm object on views.
I created a new hidden ribbon button (Ribbon Workbench works well) that had an action that referenced the JavaScript library that contained this function; the function does not need to be called - it runs when the library is loaded.
var seconds = 30;
/*
* @param {int} inSeconds: how often the view should refresh in seconds
* */
(function (inSeconds) {
var interval = setInterval(function () {
document.getElementById("crmGrid").control.refresh();
}, inSeconds * 1000);
}(seconds));
// The line to refresh the grid is not supported
What can be done in a supported manner is to refresh a sub-grid on a form; if you could get users to work from a form instead of a view you can use this supported code and call it in a manner like above or rather on the onload event:
Xrm.Page.ui.controls.get("sub_grid_name").refresh();