Here we are going to write a simple batch class to update contact phone. Batch class is generally used when we deal with mass records. Below is the program to update the contact phone. To run this batch simple go to Anonymous window (or press Ctrl + E) then execute.