Automatic account password change


we would like to implement the automatic password rotation every 3 months.
Does anyone have any idea on how we could try it on a test environment ?
Do you know how many days before is the password expiry alert sent and if it’s possible to customize it ?

Thanks for your help.