mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-15 18:24:56 +02:00
feature: plugin cronjobs
This commit is contained in:
19
system/bin/cronjob.php
Normal file
19
system/bin/cronjob.php
Normal 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();
|
Reference in New Issue
Block a user