7 Replies - 496 Views - Last Post: 05 July 2013 - 04:53 AM Rate Topic: -----

#1 fishman79  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 27-June 13

How do I create a program that checks the time?

Posted 03 July 2013 - 05:00 PM

I am trying to make a program that does something at a certain time. To do that, I need to be able to have the program check the time.
Is This A Good Question/Topic? 0
  • +

Replies To: How do I create a program that checks the time?

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 8377
  • View blog
  • Posts: 31,135
  • Joined: 12-June 08

Re: How do I create a program that checks the time?

Posted 03 July 2013 - 05:03 PM

The
datetime.now
is pretty nifty for that.
Was This Post Helpful? 0
  • +
  • -

#3 fishman79  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 27-June 13

Re: How do I create a program that checks the time?

Posted 03 July 2013 - 05:28 PM

How do I make it do that while the computer is asleep? Also, how do I make it do that every 30 minutes?
Was This Post Helpful? 0
  • +
  • -

#4 b mitsai  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 59
  • Joined: 09-November 12

Re: How do I create a program that checks the time?

Posted 03 July 2013 - 05:47 PM

That is difficult. I don't remember anykind of program awakes the computer while suspened.
So, I could say: API functions; but this is almost impossible since the PC only wake up if the button of turning on is pressed or other key. this is PHYSICAL what we are talking about.
When you press some button to wake up your PC from suspended mode, the BIOS will receive that key code and starts the computer. So, in other words, you can't :)
Was This Post Helpful? 0
  • +
  • -

#5 Luc001  Icon User is offline

  • D.I.C Addict

Reputation: 84
  • View blog
  • Posts: 617
  • Joined: 04-May 09

Re: How do I create a program that checks the time?

Posted 04 July 2013 - 12:21 AM

View Postfishman79, on 04 July 2013 - 02:28 AM, said:

How do I make it do that while the computer is asleep? Also, how do I make it do that every 30 minutes?


Hi,

Instead of do something while the PC is a sleep you should try this with Standby mode.
You can find an example, here.
Was This Post Helpful? 0
  • +
  • -

#6 dbasnett  Icon User is offline

  • D.I.C Addict

Reputation: 102
  • View blog
  • Posts: 584
  • Joined: 01-October 08

Re: How do I create a program that checks the time?

Posted 04 July 2013 - 07:43 AM

You can use the task manager to wake up the computer.
Was This Post Helpful? 0
  • +
  • -

#7 b mitsai  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 59
  • Joined: 09-November 12

Re: How do I create a program that checks the time?

Posted 04 July 2013 - 08:37 AM

well, any API function that hanldes taskmsgr? if you could wake up using taskmsg there are functions that can do something related to taskmsgr ofc.
Was This Post Helpful? 0
  • +
  • -

#8 ybadragon  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 150
  • View blog
  • Posts: 962
  • Joined: 11-May 12

Re: How do I create a program that checks the time?

Posted 05 July 2013 - 04:53 AM

If you want it to check something every 30 minutes use a timer and set it's tick value to 30 minutes (1800000 miliseconds)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1