zen.php
PHP Code:
<?php
$Host = "localhost" ; // localhost or your IP
$User = "root"; // Database user
$Password = "root"; // Database password
$Name = "dbo"; // Database name
$Amount = ; // how much zen you want to add *100
$Link = MySQL_Connect($Host, $User, $Password) or die ("<HTML><BODY><center><b>The server is momentarily down please try again after 5 minutes!</b></BODY></HTML>");
MySQL_Select_Db($Name, $Link) or die ("<HTML><BODY><center><b>The server is momentarily down please try again after 5 minutes!</b></BODY></HTML>");
$prepare_w = "SELECT ID FROM users ORDER BY ID ASC, ID ASC";
$execute_w = mysql_query($preparew);
$top_num =0;
while ($data = mysql_num_rows($execute_w))
{
$top_num++;
$uweb = "call usecash ($data["ID"] , 1, 0, 1, 0, $Amount, 1, @error)";
$resu = mysql_query($uweb);
$QWE = mysql_fetch_array($resu);
}
echo "Updated $top_num Rows";
mysql_close($Link);
?>
Crontab:
nono /etc/crontab
add a line like this:
* * * * 6 root /usr/bin/wget http://localhost/zen.php -q > /dev/null
PHP Code:
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * command to be executed
#<----------------------------------------------Start--------------------------------------->
* * * * 6 root /usr/bin/wget http://localhost/zen.php -q > /dev/null
This scrip this not tested but i think it might work.