I found a good post that queries for the latest backup, and then copies it over to the remote server in preparation for a restore. It's a batch file that is executed using cmd via sql agent step inside the restore job. Below is the existing code to copy the latest backup over:
:Variables
SET DatabaseBackupPath=\\virtualserver1\Database Backups
echo.
echo Restore WebServer Database
FOR /F "delims=|" %%I IN ('DIR "%DatabaseBackupPath%\WebServer\*.bak" /B /O:D') DO SET NewestFile=%%I
copy "%DatabaseBackupPath%\WebServer\%NewestFile%" "D:\"
--What I'd like to add are two extra pieces. First add some error handling to the existing script where it would first check the latest backup, but ensure its within the last 24 hours. If it is it continues to run. If older than 24 hours, to generate an alert via sql mail that the backup is older than 24 hours. Second if there was an issue such as not being able to reach the remote share that holds the backup, to generate an alert.
Appreciate replies.