[AutomaticRetry(Attempts = 0, OnAttemptsExceeded = AttemptsExceededAction.Fail)] is not working

I have marked my job classes also I tried it by marking the method but the attribute is being ignored, the global filter works fine if I use

GlobalJobFilters.Filters.Add(new AutomaticRetryAttribute { Attempts = 0 });

Just confused as to why the class\method attribute below is not working.

[AutomaticRetry(Attempts = 0, LogEvents = true)] is being ignored?