Commit f678997c authored by Seblu's avatar Seblu
Browse files

definition de la class cron

appel de scheduleur start et stop au bon moment
parent 4736ef93
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -18,3 +18,11 @@

#include "sls.hh"
#include "cron.hh"

void Cron::start() {

}

void Cron::stop() {

}
+10 −0
Original line number Diff line number Diff line
@@ -19,4 +19,14 @@
#ifndef CRON_HH
# define CRON_HH

class Cron {
public:
  void start();
  void stop();

protected:

private:
};

#endif
+6 −2
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#include "sls.hh"
#include "option.hh"
#include "database.hh"
#include "cron.hh"
#include "server.hh"
#include "error.hh"

@@ -32,7 +33,7 @@
Option O;
Database D;
Server S;
// Cron C
Cron C;

int main(int argc, char *argv[])
{
@@ -79,12 +80,15 @@ int main(int argc, char *argv[])
    D.open(O.database);

    // Start time manager
    //C.start();
    C.start();

    // start network
    S.start();
    S.listen(O.maxconn);

    // stop scheduler
    C.stop();

    // Close DB
    D.close();