I created a task in Task Scheduler to run at system startup, and it works great. However, I want to change it to run every time Windows wakes from sleep and I cannot figure it out. The relevant options available to me are at startup (currently), at log on, on an event. Perhaps I need to select on an event and find an event that happens when the computer wakes?
You should definitely go for the "event" option. You could try the event with the following properties:
Event-Log: System Source: Power-Troubleshooter Event-Code: 1
This one is issued every time the system wakes up from sleeping mode (suspend-to-ram). Not sure if it will work for hibernate.
Also if this event is not good for any reason, you could try finding other events. Just send your system into sleep mode, wake it up, and then look for anything related to power in the "System" event log.
If you don't object to using a third party (paid) program, it appears Macro Express™ will do as you require. There's a support post for restarting Dropbox when the machine awakes. The advice is specific to the program, but to avoid broken links:
How it works - System Event activation Windows sends messages when certain events occur. When Windows wakes up from sleep, a WM_POWERBROADCAST message is sent with the message's wParam set to PBT_APMRESUMEAUTOMATIC. By creating a macro with a System Event activation with these values a macro will run when Windows wakes up.
Macros can be set to run when other system events occur. All that is needed is to find the correct message values for the event. Reference pages document the values for system messages. Message values may be shown in decimal (536) or hexadecimal (0x218) formats, but the system Event macro activation expects decimal values.
The WM_POWERBROADCAST value is 536 decimal and the PBT_APMRESUMEAUTOMATIC value for wParam is 18 decimal. These values are used in this macro to run when Windows wakes up.
The support document is a focus on Dropbox, but my experience with Macro Express™ suggests that changing one line of the code (program name/location) will be an easy edit. The document also includes a download of the .MEX file, the native format of a saved macro.