470,636 Members | 1,455 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,636 developers. It's quick & easy.

pywin32 : scheduled weakup from standby/hiberate ?

On Windows the task scheduler tool can program (the BIOS?) to weak up
the machine from standby/hibernate at certain pre-configured times. Can
this be done directly through the (py)win32 API?

robert
Apr 18 '06 #1
2 2608
robert wrote:
On Windows the task scheduler tool can program (the BIOS?) to weak up
the machine from standby/hibernate at certain pre-configured times. Can
this be done directly through the (py)win32 API?

robert


What you need is a Waitable Timer.

The APIs to manipulate these are:

win32event.CreateWaitableTimer()
win32event.SetWaitableTimer()
win32event.CancelWaitableTimer()

The wakeup feature is enabled when the last parameter of the call to
SetWaitableTimer is True.

However, pywin32 seems to be missing a binding for the
SetThreadExecutionState() function so unless a person moves the mouse or
keyboard within a minute or two of the wakeup, the system just goes back
to sleep.

You should be able to call the SetThreadExecutionState function using
ctypes.

Search for Power Management in the MSDN library for info on these functions.

--
Jesse Hager
email = "wr********@tznvy.pbz".decode("rot13")
Apr 19 '06 #2
.."robert" <no*****@no-spam-no-spam.com> wrote in message news:e2**********@ulysses.news.tiscali.de...
On Windows the task scheduler tool can program (the BIOS?) to weak up the machine from standby/hibernate at certain
pre-configured times. Can this be done directly through the (py)win32 API?

robert


Pywin32 has a taskscheduler module that can be used
to create a scheduled task to wake up your system.
The TASK_FLAG_SYSTEM_REQUIRED flag
corresponds to the "Wake the system to run this task"
option in the UI.

hth
Roger


----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
Apr 19 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Mahesh Hardikar | last post: by
reply views Thread by Cherrish Vaidiyan | last post: by
5 posts views Thread by Phyxius | last post: by
4 posts views Thread by Mark A | last post: by
???
reply views Thread by Stoney L | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.