ScotRail announced the line will be closed for essential engineering work.