updated windows sheduled task function