This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to Reboot machine at a scheduled time?

Hello,


We have an application launcher element that installs a new silent DLP solution on end workstations.  This solution requires a reboot at some point so we want to schedule the reboot of the clients machine when they are not here (at 11:59 PM).  We are able to easily create this task and in fact I tested in a CMD prompt on my workstation the code and it did reboot my machine that evening.

While some do power down or reboot, there are quite a few that just log off or lock their screens and turn off their monitor.  This is a fail safe to make sure the machine does reboot and the new software agent that is installed becomes fully functional.  Maybe there is another way to achive this but here is the issue we are having.

The line in our bat file successfully adds a one time reboot in Scheduled Tasks :

schtasks /create /sc once /tn "reboot" /tr "shutdown -r" /st 23:59

If I run Task Scheduler as administrator I can see this task on the workstation.  However the last run result says "The operation being requested was not performed because the user has not logged on to the network.  The specified service does not exist. (0x800704DD) Author: scriptlogicuser

 

Any ideas how to bypass that?

Parents
  • Well I'm trying to add the /RU flag to insert this reboot scheduled task as "SYSTEM" account.  I'm hoping that this works instead.

    schtasks /create /RU system /sc once /tn "reboot" /tr "shutdown -r" /st 23:59

     

    YES there IS something wrong with the scheduler!  We had a weekly script set to run under the Computer side of DA to defrag hard drives.  I (and others) have sometimes noticed this pop up that Desktop Authority was going to defrag the computer.  Obviously we hit abort in the middle of the day.  I just deleted this task because we have been getting SSD drives out to more and more computers through new machines or old machine upgrades.  Defrag isn't going to do any good on an SSD.

     

    I wonder WHY the scheduler doesn't work right?  It seems random too.  Let me know if you ever figure that one out.

Reply
  • Well I'm trying to add the /RU flag to insert this reboot scheduled task as "SYSTEM" account.  I'm hoping that this works instead.

    schtasks /create /RU system /sc once /tn "reboot" /tr "shutdown -r" /st 23:59

     

    YES there IS something wrong with the scheduler!  We had a weekly script set to run under the Computer side of DA to defrag hard drives.  I (and others) have sometimes noticed this pop up that Desktop Authority was going to defrag the computer.  Obviously we hit abort in the middle of the day.  I just deleted this task because we have been getting SSD drives out to more and more computers through new machines or old machine upgrades.  Defrag isn't going to do any good on an SSD.

     

    I wonder WHY the scheduler doesn't work right?  It seems random too.  Let me know if you ever figure that one out.

Children
No Data