autodetect cron script path
This commit is contained in:
@@ -403,7 +403,7 @@ foreach ($notificationPresets as $key => $preset) {
|
|||||||
Recommended Crontab Entry
|
Recommended Crontab Entry
|
||||||
</h4>
|
</h4>
|
||||||
<div class="bg-gray-900 text-gray-100 px-4 py-3 rounded-lg font-mono text-sm break-all">
|
<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>
|
</div>
|
||||||
<p class="text-xs text-gray-500 mt-2">Update the path to match your server installation</p>
|
<p class="text-xs text-gray-500 mt-2">Update the path to match your server installation</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ use Core\Application;
|
|||||||
use Core\Router;
|
use Core\Router;
|
||||||
use Dotenv\Dotenv;
|
use Dotenv\Dotenv;
|
||||||
|
|
||||||
|
define('PATH_ROOT', __DIR__ . '/../');
|
||||||
|
|
||||||
// Load environment variables
|
// Load environment variables
|
||||||
$dotenv = Dotenv::createImmutable(__DIR__ . '/..');
|
$dotenv = Dotenv::createImmutable(__DIR__ . '/..');
|
||||||
$dotenv->load();
|
$dotenv->load();
|
||||||
|
|||||||
Reference in New Issue
Block a user