Prevent further job retries

Hi guys,
Is there a way to prevent further retries and mark the job as failed.

E.g. Job encountered uncorrectable error, invalid input data and I want to stop any further job retries and mark job as failed to analyze it later. Marking is as successful is not an option because it may expire before it will be picked up for analysis.

Take a look at the AutomaticRetryAttribute. Create your own using that as a template, or modify it depending on your build.
When your encounter the exception you’d like to stop retries at, just set the job to failed, but don’t reschedule.