Automatic magnetic stirring