Merge pull request #1 from jadeops/main

autodetect cron script path
This commit is contained in:
Hosteroid
2025-10-09 15:24:21 +03:00
committed by GitHub
2 changed files with 3 additions and 1 deletions

View File

@@ -403,7 +403,7 @@ foreach ($notificationPresets as $key => $preset) {
Recommended Crontab Entry
</h4>
<div class="bg-gray-900 text-gray-100 px-4 py-3 rounded-lg font-mono text-sm break-all">
<code>0 */<?= $currentCheckInterval ?> * * * php /path/to/cron/check_domains.php</code>
<code>0 */<?= $currentCheckInterval ?> * * * php <?= realpath(PATH_ROOT . 'cron/check_domains.php') ?></code>
</div>
<p class="text-xs text-gray-500 mt-2">Update the path to match your server installation</p>
</div>

View File

@@ -6,6 +6,8 @@ use Core\Application;
use Core\Router;
use Dotenv\Dotenv;
define('PATH_ROOT', __DIR__ . '/../');
// Load environment variables
$dotenv = Dotenv::createImmutable(__DIR__ . '/..');
$dotenv->load();