/ rdb P:12401 / t port G:*_gtime _t / today L..d:"\"l/\",$G" / log directory H..d:"\"h/\",$G" / hdb directory start:{ while[*r:@[3::;(`;P);:];_sleep 1000];W::r 1 / connect to t T::S::W 4:(`sub;) / get schema, initalize rdb app'1:L / build T from log } app:{[d]T[],:d} / append record to T end:{ ."\\mkdir ",H / make yesterday's hdb directory write'[!T;T[]] / write out data to hdb T::S / initialize T for today G::*_gtime _t / reset to today } write:{[c;d](H,"/",$c)1:d} / write a column .m.c:".k.start`" / start when t closes start` / start