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
  • 272,464
  • 47
  • 358
  • 399
m2o
  • 6,475
  • 6
  • 27
  • 24
  • 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
  • 104,512
  • 31
  • 200
  • 194
1

Kronos is another option.

Here is a similar SO question.

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

You might want to take a look at pycron.

wr.
  • 2,841
  • 1
  • 23
  • 27