Scheduling of jobs on a single machine to minimize total cost