14 lines
492 B
PHP
14 lines
492 B
PHP
<?php
|
|
// Auto-cron for MA boost - write to www-data crontab
|
|
$existing = trim(shell_exec("crontab -l 2>/dev/null") ?: "");
|
|
if (strpos($existing, "ma-boost") !== false) {
|
|
echo "ALREADY EXISTS";
|
|
exit;
|
|
}
|
|
$new = $existing . "
|
|
0 4,10,16,22 * * * curl -s http://127.0.0.1/api/ethica-ma-boost.php?t=ETHICA_API_2026_SECURE\&batch=300 > /dev/null 2>&1 # ma-boost
|
|
";
|
|
file_put_contents("/tmp/www_cron.txt", $new);
|
|
shell_exec("crontab /tmp/www_cron.txt 2>&1");
|
|
echo shell_exec("crontab -l 2>&1");
|