<?php
include $_SERVER['DOCUMENT_ROOT'].'/aaa/core/database/connect.php';
include $_SERVER['DOCUMENT_ROOT'].'/aaa/functions/general.php';
include $_SERVER['DOCUMENT_ROOT'].'/aaa/functions/users.php';
$sql = $conn->query("SELECT 'user_id' FROM 'users'") or die(mysqli_error($conn));
while ($row = $sql->fetch_assoc()) {
$user_id = $row['user_id'];
$inc_per_min = income_per_minute($user_id);
if ($inc_per_min > 0) {
$conn->query("UPDATE 'game_data' SET 'money_hand' = 'money_hand' + '$inc_per_min' WHERE 'user_id' = '$user_id'") or die(mysqli_error($conn));
}
}
?>
This is the code I want to run every minute. this is what I have in command of cron:
Current Cron Jobs
Minuto Hora Dia Mês Dia útil Comando Ações
* * * * * /home/MyUserName/public_html/aaa/cron_stack.php
Can anyone tell me why it does not work?