ola.hallengren doc shows some options for the database parameter and you can specify databases that you want to exclude from that execution.
Also, the system table backupset
Contains a row for each backup set. A backup set contains the backup
from a single, successful backup operation.
Knowing that, you could create another job or a different job step in which you would use the following
@RetryDatabases variable as the parameter for Hallengren
@Databases option and run it manually:
DECLARE @RetryDatabases nvarchar(max);
;WITH exceptdbs (database_name) AS
SELECT N'ALL_DATABASES' --option for all databases
SELECT DISTINCT database_name
WHERE type = 'D'
AND is_copy_only = 0
AND backup_start_date >= CONVERT(date, GETDATE())
SELECT @RetryDatabases = STRING_AGG(database_name, ', -')
This solution is using the function STRING_AGG that is available since sql server 2017, but if you are using an older versions there are other ways to group many rows into one line.
In SQL Server 2014 one possible way is to just substitute the
SELECT with the
STRING_AGG for this:
SELECT @RetryDatabases = STUFF((SELECT ', -' + database_name
FROM exceptdbs FOR XML PATH('')), 1, 3, '');