Cronwerks MCCode/MCCodes Forums

Please login or register.

Login with username, password and session length

News:

Have you purchased a mod and lost your copy? Just file a support ticket through your "My Mods" page.


This forum is now closed and has moved to a new location! Click here to find out why.

AuthorTopic: Cron_second.php?  (Read 1012 times)

Rain

  • Basic Member
  • *
  • Reputation Power: 13
  • Rain has no influence.
  • Offline Offline
  • Posts: 27
  • CEO of Jinks It
    • View Profile
    • WWW
Cron_second.php?
« on: September 17, 2009, 07:19:49 PM »
I have all the following crons in my public_html that work... The thing is, it says my character is, for example, 250 days old when my character is really 30 days old. Another thing is then it say my character's Last Action is -50 seconds ago, I was thinking I need a cron_second.php to fix this maybe? Not sure if anyone knows how to fix this PM me or post it here

Danny696

  • Senior Member
  • ****
  • Reputation Power: 317
  • Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.
  • Offline Offline
  • Posts: 540
    • View Profile
    • WWW
Re: Cron_second.php?
« Reply #1 on: September 18, 2009, 09:01:56 AM »
cron_second no, make sure no cron is posted twice or if theres an error or a query reppeted twice
Logged
Project Choosen - 10%
Daniel - Hanson . Com

Rain

  • Basic Member
  • *
  • Reputation Power: 13
  • Rain has no influence.
  • Offline Offline
  • Posts: 27
  • CEO of Jinks It
    • View Profile
    • WWW
Re: Cron_second.php?
« Reply #2 on: September 18, 2009, 01:26:46 PM »
I dont have any crons posted twice, also what do you mean bu the query repeated twice?

Danny696

  • Senior Member
  • ****
  • Reputation Power: 317
  • Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.
  • Offline Offline
  • Posts: 540
    • View Profile
    • WWW
Re: Cron_second.php?
« Reply #3 on: September 19, 2009, 07:03:08 AM »
Go into the cron there mabey things like this:  $db->query("UPDATE users SET blahh=blahh+2 WHERE userid=$userid");
$db->query("UPDATE users SET blah=blah+1 WHERE userid=$userid");
$db->query("UPDATE users SET blahh=blahh+2 WHERE userid=$userid"); 
causing blahh to be +4 not +2
Logged
Project Choosen - 10%
Daniel - Hanson . Com

Cronus

  • Administrator
  • Senior Member
  • *****
  • Reputation Power: 2901
  • Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!
  • Offline Offline
  • Posts: 550
    • MSN Messenger - preston__08@hotmail.com
    • View Profile
    • WWW
Re: Cron_second.php?
« Reply #4 on: September 19, 2009, 08:47:53 AM »
Never run a cron_second.
If you are running a cron that runs every second, you're wasting sooooooo much bandwidth.
Plus, your site will probably lag, permanently.
Logged
My msn is preston__08@hotmail.com if anyone is interested, I am online frequently.

gambino

  • Active Member
  • **
  • Reputation Power: 0
  • gambino is looked down upon.gambino is looked down upon.gambino is looked down upon.
  • Offline Offline
  • Posts: 113
    • View Profile
Re: Cron_second.php?
« Reply #5 on: September 19, 2009, 05:33:32 PM »
that would have to be a server error. crons can only support up to a minute to years. server might be buffering way too fast. you could switch to my hosting server if you get permission from my WHP to get it and I will submit the support ticket to see if your approved.

if I can if mccodes.com would let me do some paid modifying to your site.
Logged

Rain

  • Basic Member
  • *
  • Reputation Power: 13
  • Rain has no influence.
  • Offline Offline
  • Posts: 27
  • CEO of Jinks It
    • View Profile
    • WWW
Re: Cron_second.php?
« Reply #6 on: September 19, 2009, 06:27:18 PM »
Well heres the DB Query part in my crons_day.php. Tel lme if there is anything wrong with it

$db->query("UPDATE users SET fedjail=0 WHERE userid IN(".implode(",", $ids).")");
}
$db->query("DELETE FROM fedjail WHERE fed_days=0");
$db->query("UPDATE users SET daysingang=daysingang+1 WHERE gang > 1");
$db->query("UPDATE users SET daysold=daysold+1, boxes_opened=0");
$db->query("TRUNCATE TABLE rating");
$db->query("UPDATE users SET mailban=mailban-1 WHERE mailban > 0");
$db->query("UPDATE users SET donatordays=donatordays-1 WHERE donatordays > 0");
$db->query("UPDATE users SET cdays=cdays-1 WHERE course > 0");
$db->query("UPDATE users SET bankmoney=bankmoney+(bankmoney/50) where bankmoney>0");
$db->query("UPDATE users SET cybermoney=cybermoney+(cybermoney/100*7) where cybermoney>0");
$db->query("UPDATE users SET sbban=sbban-1 WHERE sbban > 0");
$q=$db->query("SELECT * FROM users WHERE cdays=0 AND course > 0");
while($r=$db->fetch_row($q))$db->query("UPDATE users SET fedjail=0 WHERE userid IN(".implode(",", $ids).")");
}
$db->query("DELETE FROM fedjail WHERE fed_days=0");
$db->query("UPDATE users SET daysingang=daysingang+1 WHERE gang > 1");
$db->query("UPDATE users SET daysold=daysold+1, boxes_opened=0");
$db->query("TRUNCATE TABLE rating");
$db->query("UPDATE users SET mailban=mailban-1 WHERE mailban > 0");
$db->query("UPDATE users SET donatordays=donatordays-1 WHERE donatordays > 0");
$db->query("UPDATE users SET cdays=cdays-1 WHERE course > 0");
$db->query("UPDATE users SET bankmoney=bankmoney+(bankmoney/50) where bankmoney>0");
$db->query("UPDATE users SET cybermoney=cybermoney+(cybermoney/100*7) where cybermoney>0");
$db->query("UPDATE users SET sbban=sbban-1 WHERE sbban > 0");
$q=$db->query("SELECT * FROM users WHERE cdays=0 AND course > 0");
while($r=$db->fetch_row($q))

Danny696

  • Senior Member
  • ****
  • Reputation Power: 317
  • Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.
  • Offline Offline
  • Posts: 540
    • View Profile
    • WWW
Re: Cron_second.php?
« Reply #7 on: September 20, 2009, 08:58:10 AM »
pm me your whole cron day file
Logged
Project Choosen - 10%
Daniel - Hanson . Com

Jordan

  • Active Member
  • **
  • Reputation Power: 55
  • Jordan has no influence.
  • Offline Offline
  • Posts: 102
  • Website Developer for hire;
    • MSN Messenger - Pudda2008@hotmail.co.uk
    • View Profile
    • WWW
    • Email
Re: Cron_second.php?
« Reply #8 on: September 28, 2009, 01:26:40 AM »
I can have a look into this with you if you're still getting this.

Pudda2008@hotmail.co.uk - IM me
Logged
Contact me
MakeWebGames.com
 


This forum is now closed and has moved to a new location! Click here to find out why.