views:

49

answers:

2

I have a Java app runs on Win7, it does something at start and goes to sleep for an hour, then wakes up to do more things after the hour, but Win7 goes into sleep mode after 15 minutes of inactivity, so I wonder if I can register a task with the Windows task scheduler in my Java app before it goes into thread sleep, so that Win7 will wake up 59 minutes after the Java app goes into sleep, then 1 minute after windows wake up, my Java app will wake up to do its thing.

So is registering a task with the Windows task scheduler doable in Java ? I only care about running it in Win7. Not Unix or Mac. If so any sample code ?

A: 

Use AT command to setup task in windows.

Here is an example, of how to execute command from java

org.life.java
I thought about this too, what would I execute in Java to schedule a wake up action for Windows OS ? How does the command look like ?
Frank
@Frank frankly if i tell you , you can ask for the command or action that is needed for it @ superuser.com than make use of this
org.life.java
A: 

schtasks then make use of org.life.java post on executing a cmd

Aaron