task scheduler working correctly finally