I found out that the restart was done by SYSTEM & i have the Task Scheduler to run for the another User & not SYSTEM.
So i configured another Task Scheduler to run for SYSTEM user.