Feature #1790
Add support for cron scheduling to modular input base class
Start date:
03/17/2017
Due date:
% Done:
0%
Related issues
History
#1 Updated by Luke Murphey over 7 years ago
- Blocks Feature #1731: Speedtest modular input added
#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
- Not a single file
- Can take a string in parse() and run the default function
- Allows the designation of the current time
- Used in REST API mod input
- Not a cron scheduler
- Seems a little heavy
- Not a single file
- Might be a good fit
- Not sure if it needs a complete cron or just a time
- Not sure how to run missed inputs
#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
#5 Updated by Luke Murphey over 7 years ago
This one looks good: https://pypi.python.org/pypi/croniter/
#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
- Blocks deleted (Feature #1731: Speedtest modular input)
#9 Updated by Luke Murphey over 7 years ago
- Related to Feature #1731: Speedtest modular input added
#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:
- Every minute, check to see if the input should run: job.check_trigger()
- If so, execute
- 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.
#12 Updated by Luke Murphey over 7 years ago
https://splunkbase.splunk.com/app/1546/ uses croniter
#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
- croniter