feature: plugin cronjobs (#215)

This commit is contained in:
Slawomir Boczek
2023-08-31 08:33:32 +02:00
committed by GitHub
parent 8a3986932d
commit 5f10773189
4 changed files with 72 additions and 1 deletions

19
system/bin/cronjob.php Normal file
View File

@@ -0,0 +1,19 @@
<?php
require_once __DIR__ . '/../../common.php';
require_once SYSTEM . 'functions.php';
require_once SYSTEM . 'init.php';
require_once SYSTEM . 'hooks.php';
$hooks = new Hooks();
$hooks->load();
use GO\Scheduler;
// Create a new scheduler
$scheduler = new Scheduler();
$hooks->trigger(HOOK_CRONJOB, ['scheduler' => $scheduler]);
// Let the scheduler execute jobs which are due.
$scheduler->run();