Unfortuanately, we don't have a way to do this from the command line -- just the Web UI. Also, because there is no SQL database on the USRM, you can't write a script to get the data and then run that script in the cron. The "database" on the USRM is a collection of binary files in the /opt/usrm/persistdata/ directory.
We do have the persistgrep tool in the /opt/usrm/linux-tools/ directory on the USRM, but since you're grep'ing, you can't really query with this tool. This tool now comes standard with USRM 2.1.x. Here is the syntax in case this tool is helpful to you in the future:
# persistgrep -?
Everything in the /opt/usrm/linux-tools/ directory is in the path.
Introduction: The "external-out enable" command is available for
configuration under the "router ospf process" in case of the IOS-XR
operating system. This command basically enables advertisement of
intra-area routes on the device as external routes in th...
Introduction Basic configuration for netflow Scale parameters for
netflow Netflow support Architecture Packet flow for netflow Inside the
LC CPU Netflow Cache size, maintenance and memory Sample usage Cache
Size Aging Permanent cache Characteristics Which...