Project

General

Profile

Feature #1790

Add support for cron scheduling to modular input base class

Added by Luke Murphey over 7 years ago. Updated over 7 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
Target version:
-
Start date:
03/17/2017
Due date:
% Done:

0%


Related issues

Related to File Meta-data Monitoring - Feature #1095: Use cron type frequency definition New 10/28/2015
Related to Network Tools - Feature #1731: Speedtest modular input Closed 02/06/2017

History

#1 Updated by Luke Murphey over 7 years ago

#2 Updated by Luke Murphey over 7 years ago

Needs:
  • Ability to parse cron schedule
  • Ability to derive when the schedule indicates a run should happen

#3 Updated by Luke Murphey over 7 years ago

Some libraries:

https://github.com/josiahcarlson/parse-crontab
  • Two files
  • Don't see a way to parse
https://github.com/ziberna/py-scheduler
  • Not a single file
  • Can take a string in parse() and run the default function
https://pypi.python.org/pypi/croniter
  • Allows the designation of the current time
  • Used in REST API mod input
https://github.com/dbader/schedule
  • Not a cron scheduler
https://github.com/ahawker/crython
  • Seems a little heavy
  • Not a single file
http://code.activestate.com/recipes/577466-cron-like-triggers/
  • Might be a good fit
  • Not sure if it needs a complete cron or just a time
  • Not sure how to run missed inputs

https://pypi.python.org/pypi/python-crontab

#4 Updated by Luke Murphey over 7 years ago

Could make the cron schedule readable with https://pypi.python.org/pypi/cron_descriptor/1.2.0

#6 Updated by Luke Murphey over 7 years ago

  • Related to Feature #1095: Use cron type frequency definition added

#7 Updated by Luke Murphey over 7 years ago

  • Target version changed from 0.8 to 0.10

#8 Updated by Luke Murphey over 7 years ago

#9 Updated by Luke Murphey over 7 years ago

#10 Updated by Luke Murphey over 7 years ago

  • Target version changed from 0.10 to 1.0

#11 Updated by Luke Murphey over 7 years ago

I think the algorithm could work like this:

  1. Every minute, check to see if the input should run: job.check_trigger()
  2. If so, execute
Problems to be solved:
  • What happens when the search has missed execution
    • I think we should do nothing
  • Should this only be used with multi-threaded, or multi-instance mode since otherwise a flooded system may skip inputs?
    • Probably
  • Should the check time be made more frequent? 15 seconds means that only 4 inputs can be executed per minute.

#13 Updated by Luke Murphey over 7 years ago

  • Status changed from New to Rejected
  • Target version deleted (1.0)

#14 Updated by Luke Murphey over 7 years ago

Dependencies:

  • crontab
    • croniter
      • six
      • dateutil

Also available in: Atom PDF