Hello everyone, and thank you for reading my post. I started hosting an Mccode server on my account, which has worked out just fine, but the cron jobs do not seem to want to work, either that, or I'm just asting your time here q.q . I wanted to use a cron job every 5 or minutes, tried it on diffrent time intervals and it still didn't work.
The Cron I want to activate is energy regeneration, which seems to stay at 0 even if the cronjob is on. This is the code inside the cron itself:
PHP Code:
require_once(dirname(__FILE__) . "/../mysql.php");
require_once(dirname(__FILE__) . "/../global_func.php");
$cron_code = 'a57d16b7cad75b14ba73ecf03859e80a';
if ($argc == 2)
{
if ($argv[1] != $cron_code)
{
exit;
}
}
else if (!isset($_GET['code']) || $_GET['code'] !== $cron_code)
{
exit;
}
// update for all users
$allusers_query =
"UPDATE `users`
SET `brave` = LEAST(`brave` + ((`maxbrave` / 10) + 0.5), `maxbrave`),
`hp` = LEAST(`hp` + (`maxhp` / 3), `maxhp`),
`will` = LEAST(`will` + 10, `maxwill`)";
mysql_query($allusers_query, $c);
//enerwill update
$en_nd_query =
"UPDATE `users`
SET `energy` = `maxenergy`
WHERE `donatordays` = 0";
$en_don_query =
"UPDATE `users`
SET `energy` = LEAST(`energy` + (`maxenergy` / 6), `maxenergy`)
WHERE `donatordays` > 0";
mysql_query($en_nd_query, $c);
mysql_query($en_don_query, $c);
In the following 2 pictures you can see what the cron's path is and what path I used in the cronjobs menu.
Quote:
1. 
2.
|
I would ask you to please try and see if what I did wrong and help me with steps to make this cron work properly:| .