Add run subroutine to run jobs.