For this scenario, I would create a custom stored procedure that meets the requirement to throw an error when you want. Then, in the Scheduler Administration tool exporter section, you will need to call the stored procedure.
For example: call <custom_stored_procedure>
Then, enable retry by selecting the option "Only queries which return an error" in the Scheduler job.
You can refer to the official documentation on [Developing Stored Procedures](https://community.denodo.com/docs/html/browse/6.0/vdp/developer/developing_extensions/developing_stored_procedures/developing_stored_procedures) from Virtual DataPort Developer Guide.
Also, you can refer to the sample stored procedures and their source code located in the following path: <DENODO_HOME>/samples/vdp/storedProcedures
Hope this helps you!