35 #include <boost/algorithm/string.hpp>
42 : m_within_window(false), m_enabled(true) {
44 for (
auto &spec : crontab_specs) {
46 boost::trim_if(spec, boost::is_any_of(
"\"'"));
51 HT_FATALF(
"Problem parsing time window crontab entry (%s) - %s",
52 spec.c_str(), e.what());
66 next = crontab.next_event(now);
69 if (next - now <= (time_t)60) {
bool m_within_window
Set to true if currently within the time window.
Declarations for TimeWindow.
bool update_current_time(time_t now=0)
Logically sets the current time.
Tracks timing of periodic events.
Logging routines and macros.
Compatibility Macros for C/C++.
#define HT_FATALF(msg,...)
This is a generic exception class for Hypertable.
TimeWindow()
Default constructor.
Crontab class for periodic events.
Error codes, Exception handling, error logging.
std::vector< Crontab > m_crontabs
Vector of Crontab objects that define each subwindow.