#define XERR "cron"
#include "cron.ih"

// runs as a separate thread

    // by parentprocess.cc

void Cron::cronCmds()
{
    while (true)
    {
        time_t secs = time(0) % 60;
        this_thread::sleep_for(seconds(60 - secs));

        for (CronEntry const *entry: cronJobs())
            cronCmd(*entry);
    }
}
