We reload all event hendlers if time skew in script own counter more
than 60 seconds as per ab68a26e84, no
other timekeeping issues are reported, so considering
AnyEvent->now_update useless for this particular usecase.
AnyEvent does not sync its timers with system time, so cron jobs that
scheduled for particular time, shoots with time skew after wakeup from
hibernate or suspend. And AnyEvent have no mechanism to sync its timers
with local system time. The only way to "sync" timers is to remove and
re-add watchers, so timers begin count time from beginning.
To workaround timekeeping issue for AnyEvent::Timer::Cron let's add
another time-based call back that will send SIGHUP to script if local
system time differs from time counter more than 60 seconds. SIGHUP
should trigger signal handler that remove all event watchers, re-read
config and re-add event watchers effectively reloads config and re-launch
timers for AnyEvent.
* Use perlcritic to lint script, add .perlcriticrc config
* Do not generate json on every output iteration, use $UPDATE variable
to detect if updates are ready.