Skip to main content

Pre-job action: rebooting the computer

Thread needs solution

I use the following to shutdown as a post-job action:

%WINDIR%\SYSTEM32\SHUTDOWN.EXE /s /t 180 /c "Shutdown in 180 seconds" /d p:4:1

Is it possible to similarly set a pre-job action to restart the computer? Will that interfere with the job running immediately after Windows comes back up?

0 Users found this helpful

Eliezer, please see the ATI 2014 User Guide section on Scheduling which has an Advanced option intended to allow for waking up a sleeping or hibernating computer to perform a backup task.

Advanced settings

Clicking Advanced settings allows you to specify the following additional settings for backup and validation:

  • To postpone a scheduled operation until the next time the computer is not in use (a screen saver is displayed or computer is locked), select the Run the backup only when the computer is idle check box. If you schedule validation, the check box will change to Run the validation only when the computer is idle.
  • If you want to wake up the sleeping/hibernating computer to perform the scheduled operation, select the Wake up the sleeping/hibernating computer check box.

    Depending on your operating system settings, this option may not be available.

  • If the computer is switched off when the scheduled time comes, the operation won't be performed. You can force the missed operation to run at the next system startup. To do so, select the Run at system startup check box.

    Additionally, you can set a time delay to start backup after the system startup. For example, to start backup 20 minutes after system startup, type 20 in the appropriate box.

Thanks, Steve, but I don't understand how you're answering my question. Could you please explain?

Thanks, Steve, so are you saying I would put a batch file like this:

%WINDIR%\SYSTEM32\SHUTDOWN.EXE /r /t 180 /c "Restart in 180 seconds" /d p:4:1

as a pre-action - then using the Advanced Settings, set a delay?

Eliezer, sorry but you cannot use a Pre Command that would perform a reboot as the task will then fail due to shutting down.  You should just be able to Schedule the task and allow the computer to go into sleep or hibernation state and wake up to perform the scheduled task per the Advanced settings for this.