Most of problems that happen in the real world, appear in a discrete way mostly, such as timetable scheduling, vehicle routing problem or flow shop scheduling etc. This research improves discrete particle swarm optimization and applies it to staff scheduling and rostering problem. We firstly, set up staff scheduling and rostering problem with constraint satisfied problem, and then establish whole constraint condition that have to consider in rostering process according to problem mode, finally get one successful optimization form.