sort tasks regarding task ID and task's directory
fix busy time before or after work time and work time after current time