Win 10, wake computer, run Cobian

canalrun1

Prominent
Nov 9, 2017
2
0
520
Hello,
I would like to have Cobian backup 11 backup two directories on my computer at 6:05 AM every morning.

If I run the Cobian backup "tasks" manually, the backups complete properly.

If I set Win 10 Power-sleep to "Never", the backup runs properly at 6:05 AM.

If I set Win 10 Power-sleep to something like two hours, the Cobian backup does not run. (I can see in the Cobian logs that the backup did not run.)

If I use Win 10 task scheduler to create a task that should wake up the computer at 6 AM, Task scheduler reports that the task runs successfully at 6 AM (according to task scheduler - run as administrator), but my Cobian backup does not run – as if the computer is asleep.

The task I run at 6 am in test scheduler is cmd.exe /c "exit":

My best guess is that the task that is being run is not waking the computer so that the Cobian backup runs - it seems the command being is being run without waking up the computer.

Is this likely true? Is there a better way to wake up a Win 10 computer?

Thanks,
Barry.
 
Solution


Thanks.

Cobian has an option to run backup tasks as a different user (tasks-advanced-impersonate). I entered my user credentials. The Cobian tasks run correctly at the scheduled time.

I also have a Win 10 scheduled task set up to run "cmd.exe /c exit" at 6 AM. My guess is that this does wake up the computer at 6 AM – although with nobody logged in. By adding the user credentials to the Cobian task, it logged someone in, and the scheduled Cobian backup ran at 6:05 AM.

Just for grins I may see if the Cobian (with login credentials) still runs at the scheduled time if I disabled the Win 10 wake-up task...
Hi, the task can't run while the computer is asleep. It's impossible. The task can only run after it wakes up the computer.

Lets separate this into 2 different issues.
#1. Wakeup the PC.
#2. Make Cobian run its backup.

Since you've determined that your computer won't wake up unless the Power-Sleep is set to Never, I would leave it at Never for now.

If you want the computer to go back to sleep after the 6am wakeup, you can do this with another command. Here's what I would do. Make a batch file that wakes up the PC, waits for Cobian to run, then goes back to sleep. Run this with a scheduled task.

I tried to get it working on my PC and here is what I did. Open notepad and save this is a batch file (wakeup.bat).

@echo off
echo Waiting 8 minutes before going back to sleep...
echo.
echo WARNING: If you press a key now, the computer will go back to sleep.
echo You can abort this batch by pressing Ctrl+Break and then Y and Enter.
echo.
REM The timeout command wants seconds, so 60 (seconds) times 8 (minutes) is 480.
timeout /t 480
echo.
echo Going back to sleep
rundll32.exe powrprof.dll,SetSuspendState sleep


Note: You may want to modify the above to give the timeout more time.

Create a task to run this batch file. I clicked on Create Task and made the following changes:
General - Name: Wakeup
[check] Run with highest priveleges.
Triggers - New - Set a Daily task and set the time.
Actions - New - Choose the batch file you created above.
Conditions - [check] Wake the computer to run this task.

Test this out. Go ahead and set the task up to run 5 minutues from now. Set your PC to sleep and make sure it fully wakes up, waits 8 minutes, then goes back to sleep. For my setup, I just see the login screen, however the batch file does run in the background and the PC goes back to sleep after 8 minutes.

After you get the batch file working, then set Cobian to run its backup about 12 minutes from now. Set the schedule task to run the batch file to start about 10 minutes from now. Put the PC in sleep mode and test it out. Wait until the PC wakes up, does it thing, and goes back to sleep before wakting it up again to see the results.

I was able to get it working using the above batch file and Cobian 11. I only set it up to backup 2 files but it fully worked.

If you can't get the wakeup or batch file working, then we'll work on that problem. If you can't get Cobian working, then we'll work on that problem. Keep them separated.

Also, do you remember HOW you installed Cobian? There's like 3 or 4 different choices. I installed it as a Service for the Local user only.
 


Thanks.

Cobian has an option to run backup tasks as a different user (tasks-advanced-impersonate). I entered my user credentials. The Cobian tasks run correctly at the scheduled time.

I also have a Win 10 scheduled task set up to run "cmd.exe /c exit" at 6 AM. My guess is that this does wake up the computer at 6 AM – although with nobody logged in. By adding the user credentials to the Cobian task, it logged someone in, and the scheduled Cobian backup ran at 6:05 AM.

Just for grins I may see if the Cobian (with login credentials) still runs at the scheduled time if I disabled the Win 10 wake-up task.

Barry.

 
Solution
I was kinda wondering if the whole user account thing might be the problem if you look at the last paragraph I typed above.

I'm not sure Cobian would wake up the PC by itself since I don't think it uses a Scheduled Task or is able to set waketimers.

Anyway, I'm glad you got it figured out.