diff ui/main.cpp @ 827:8de162b91a22

(Issue49) Create a Scheduled daily task to run trustbridge
author Andre Heinecke <andre.heinecke@intevation.de>
date Wed, 23 Jul 2014 19:47:59 +0200
parents 1e61903f61e2
children 294d76174102
line wrap: on
line diff
--- a/ui/main.cpp	Mon Jul 21 18:53:13 2014 +0200
+++ b/ui/main.cpp	Wed Jul 23 19:47:59 2014 +0200
@@ -9,6 +9,9 @@
 #include "processhelp.h"
 #include "logging.h"
 #include "selftest.h"
+#ifdef WIN32
+#include "taskscheduler.h"
+#endif
 
 #include <QApplication>
 #include <QSystemTrayIcon>
@@ -97,6 +100,14 @@
         return 1;
     }
 
+#ifdef Q_OS_WIN
+    {
+        TaskScheduler taskSched;
+        qDebug() << " task sched done: " << taskSched.createDailyTask(QCoreApplication::applicationFilePath(),
+                QString::fromLatin1("--tray"), QTime::currentTime());
+    }
+#endif
+
     MainWindow mainWin(trayMode);
 
     return app.exec();

http://wald.intevation.org/projects/trustbridge/