2

I'm writing code in python for some sort of daemon that has to execute a specific action at a certain instance in time defined by a crontab string. Is there a module I can use? If not, can someone paste/link an algorithm I can use to check whether the instance of time defined by the crontab has occured in the time from when the previous check was done. Thanks.

RichieHindle
  • 258,929
  • 46
  • 350
  • 392
m2o
  • 6,075
  • 6
  • 26
  • 23
  • 2
    Could you clarify your question. "check whether the instance of time defined by the crontab has occured in the time from when the previous check " is pretty hard to parse. – S.Lott May 05 '09 at 21:00
  • The daemon sleeps for eg. 2min, and when it starts working again I want to check if in those 2 min the instance occurred.. – m2o May 05 '09 at 21:14
  • Please update the question -- don't add comments to clarify your question -- update your question, please. – S.Lott May 06 '09 at 01:12

3 Answers3

3

sched ftw

Jochen Ritzel
  • 99,912
  • 29
  • 194
  • 188
1

Kronos is another option.

Here is a similar SO question.

Community
  • 1
  • 1
Philip Tinney
  • 1,936
  • 17
  • 19
0

You might want to take a look at pycron.

wr.
  • 2,831
  • 1
  • 22
  • 25