Toilet training

Myself,  my husband and the key staff at my Sons school.have been trying to.toilet train my Son who's nine for a long time.  At home we have occasional success and at school.they have more success.  My Son knows exactly  how to.use the toilet but he often refuses to.  Any advice please?