The Following User Says Thank You to hypnotik For This Useful Post: | ||
![]() |
2009-12-10
, 19:43
|
Posts: 631 |
Thanked: 837 times |
Joined on May 2007
@ Milton, Ontario, Canada
|
#12
|
import time while 1: //Your python code goes here //Now we wait for 5 ( 5 minutes * 60 seconds) minutes time.sleep(5 * 60)
The Following User Says Thank You to jolouis For This Useful Post: | ||
![]() |
2009-12-11
, 15:51
|
Posts: 9 |
Thanked: 0 times |
Joined on Dec 2009
|
#13
|
![]() |
2009-12-12
, 21:28
|
Posts: 543 |
Thanked: 181 times |
Joined on Aug 2009
@ Universe,LocalCluster.MilkyWay.Sol.Earth.Europe.Slovenia.Ljubljana
|
#14
|
![]() |
2009-12-14
, 05:19
|
Posts: 486 |
Thanked: 251 times |
Joined on Oct 2009
|
#15
|
You can do it with your python script itself... just put your code into a loop that repeats forever, and at the end of the loop (just before you start again), put a nice long sleep in.
import time while 1: # Now we wait for the next 5 minute boundary time.sleep(300 - time.time()%300) # Your python code goes here, # all the following lines are just an example t = time.time() ts = time.localtime(t) print t print ts print time.asctime(ts)
![]() |
2010-01-25
, 21:59
|
Posts: 55 |
Thanked: 14 times |
Joined on Mar 2009
@ UK
|
#16
|
Hi, i went about writing a new event object for alarmd, but how would i go about executing the test file?
do i just do "/usr/sbin/alarmd filename"?
Thanks.
barriosquare - maemo/n900 foursquare app - get it now from extras-devel
My technology blog posts
follow me on twitter