How to run ntfsfix automatically when a disk with corrupted partition is plugged in?

I'm wondering if it's possible to detect a corrupted partition automatically and run ntfsfix on that partition to fix it when a disk is plugged in similar to Windows asking to run chkdsk. But I haven't found anything useful.

-