forked from SimpleMachines/SMF
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcron.php
34 lines (27 loc) · 811 Bytes
/
cron.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
/**
* This file is not designed to ever be run directly from within SMF's
* conventional running, but called externally to facilitate background tasks.
* It can be called either by URL or via cron (or whatever the equivalent is on
* the server's operating system).
*
* Simple Machines Forum (SMF)
*
* @package SMF
* @author Simple Machines https://www.simplemachines.org
* @copyright 2024 Simple Machines and individual contributors
* @license https://www.simplemachines.org/about/smf/license.php BSD
*
* @version 3.0 Alpha 2
*/
declare(strict_types=1);
// Don't do anything if SMF is already loaded.
if (defined('SMF')) {
return true;
}
define('SMF', 'BACKGROUND');
// Initialize.
require_once __DIR__ . '/index.php';
$task_runner = new SMF\TaskRunner();
$task_runner->execute();
?>