Restore keeps failing
I would verify the integrity of your backup files using the following commands.

Restore HEADERONLY

SQL BOL: Returns a result set containing all the backup header information for all backup sets on a particular backup device. 

RESTORE HEADERONLY FROM DISK ='\\sharedfileserver\folder\AvailabilityGroup1_Database1_FULL_20161029_201228_1.bak'


You might find some information why your backup file is not working.

Restore FILELISTONLY

SQL BOL: Returns a result set containing a list of the database and log files contained in the backup set.

RESTORE FILELISTONLY FROM DISK = '\\sharedfileserver\folder\AvailabilityGroup1_Database1_FULL_20161029_201228_1.bak'


There was a rare occasion where the logical filename of the database was truncated in SQL Server 2008 R2

You might find more information in the ERRORLOG of the server you are restoring to. Otherwise I would consider running the restore script outside of the scheduled task in Query Window to catch any other errors.