Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I keep alot of my classwork documents hosted on dropbox as well as my personal site for remote storage. This helps alot since I switch between an iPad, laptop and desktop, so there are no worries about my documents being out of touch.

Problem is, this solution relies on me remembering to execute the sync program (synctoy) for win7, so I'd like a solution to do this automatically. I've found some scripting help that should work on bootup, but how can I get the script to execute on entering sleep and hibernate, resuming from both, as well as executing before shutdown.

share|improve this question
+1 Good question. I'm aware there are specific scripts you can add to in Ubuntu Linux for this (though I'd like to know specifically which myself). Anyway, I've totally had this come up in using Windows too. –  Doc Aug 9 '11 at 23:36

2 Answers 2

Try this when the computer returns from Hibernate or Sleep Mode

Begin the Task: On an event
Setting Basic
Log:  System
Source: Power-Troubleshooter
Event ID: 1
The system has resumed from sleep.

When you put the computer in Hibernate or Sleep Mode

Begin the Task: On an event
Setting Basic
Log:  System
Source: Kernel-Power
Event ID: 42
The system is entering sleep.
share|improve this answer
thanks, this did the trick! –  Allanrbo Jul 9 '12 at 23:13

You can create a task that uses any of the following options as triggers for the Task Scheduler in Windows 7:

  • On Schedule
  • On Logon
  • At Startup
  • On Idle
  • On An Event
  • On connection to User Session
  • On disconnect from User Session
  • On Workstation lock
  • On Workstation unlock

There's lots to work with there, I'd be looking at the on Idle, on Workstation lock and On Workstation Unlock triggers. That's probably your best bet.

Hope that helps.

share|improve this answer
Bingo. I have a task scheduled that runs SyncToyCmd.exe -R daily, so it should work fine with the other triggers, too. –  Andrew Coleson Aug 13 '11 at 4:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.