From 7094555f9fc498088876058852736f596475d997 Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Tue, 17 Oct 2023 16:51:53 +0700 Subject: [PATCH] add cronjob info --- system/controllers/settings.php | 6 ++++++ ui/ui/app-settings.tpl | 16 ++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/system/controllers/settings.php b/system/controllers/settings.php index c442ebac..20dff3e3 100644 --- a/system/controllers/settings.php +++ b/system/controllers/settings.php @@ -37,6 +37,12 @@ switch ($action) { $themes[] = $file; } } + $php = trim(shell_exec('which php')); + if(empty($php)){ + $php = 'php'; + } + $ui->assign('php', $php); + $ui->assign('dir', str_replace('controllers','', __DIR__)); $ui->assign('themes', $themes); run_hook('view_app_settings'); #HOOK $ui->display('app-settings.tpl'); diff --git a/ui/ui/app-settings.tpl b/ui/ui/app-settings.tpl index 4a2540e7..0bf9fe43 100644 --- a/ui/ui/app-settings.tpl +++ b/ui/ui/app-settings.tpl @@ -86,12 +86,12 @@
-
-

Radius Not Yet Ready

+

Radius Instructions

@@ -333,6 +333,18 @@
/ip hotspot walled-garden
 add dst-host={$_domain}
 add dst-host=*.{$_domain}
+ +
+# Expired Cronjob Every 5 Minutes
+*/5 * * * * cd {$dir} && {$php} cron.php
+
+# Expired Cronjob Every 5 Minutes
+0 * * * * cd {$dir} && {$php} cron.php
+
+
+# Reminder Cronjob Every 7 AM
+0 7 * * * cd {$dir} && {$php} reminder.php
+