<?php 
// cron.php
// handles cronjobs
// cd /home/{username}/public_html/{path to root}/app/ ; /opt/cpanel/ea-php72/root/usr/bin/php cron.php;
// require_once("includes/phpmailer/class.phpmailer.php");
require_once("../config.php");
require_once("functions.php");
require_once("query-functions.php");
require_once("table-functions.php");

spl_autoload_register(function($class_name) {
	$file = "classes/class-".$class_name.".php";
	if(file_exists($file))
		include $file;
});

require_once("../contents/plugins/plugins.php");
require_once("pages/templates.php");
$plugins = new plugins();
$plugins->load();
$session = Session::getInstance();
$cron = new cronjobs;
$cron->check_due_jobs();
update_option("cron_is_working_on_server", 1);