This paper considers two-person cooperative games on scheduling problem which is motivated by the medication dispensing at outpatient pharmacies. We prove that two-person cooperative games on minimizing the number of tardy jobs is NP-hard, and two-person cooperative games on minimizing the total weighted number of tardy jobs and on minimizing the total weighted completion time are NP-hard even if the jobs have the same processing times. We develop dynamic programming algorithms for problems of two-person cooperative games on minimizing the total (weighted) number of tardy jobs and on minimizing the total (weighted) completion time respectively, which run in pseudo-polynomial time and indicate that they are binary NP-hard.