Jump to content
MakeWebGames

Cron jobs help


Shole

Recommended Posts

I need help to set up the cron jobs i have a cpanel host but i dont have the curls of the corn since i installed the game long time ago and i dont know how to set up the crons. If someone can help me pleas pm me or post here!

Link to comment
Share on other sites

*/5 * * * * curl http://$path/cron_fivemins.php?code=$code

* * * * * curl http://$path/cron_minute.php?code=$code

0 * * * * curl http://$path/cron_hour.php?code=$code

0 0 * * * curl http://$path/cron_day.php?code=$code

 

Not sure if this is what ya want

$path = Your domain

$code = As furn stated look inside your config.php for the long code

Or make one up and add it to the $code in your config.php Bare in mind the $code for the CURL needs to match that of your new code

Link to comment
Share on other sites

I have a cron problem but not sure it is with my game.

everything runs at twice the speed. by donator days goes down 2 per day, my minutes run at every 30sec, bank interest and job pay twice in 1 day.

been trying to sort this for weeks now and can't find the problem. I got the owner of the hosting site my game is on to try to help and he thought it was because one of my cron files could be in a loop.

however I ran a few more checks today and notice that the game time is off too. the seconds go up in 2s instead of 1s. so is this a fault of my game or is it a server fault with the hosting?

everything was running fine up untill I changed hosts a few months back.

Link to comment
Share on other sites

everything runs at twice the speed. by donator days goes down 2 per day, my minutes run at every 30sec, bank interest and job pay twice in 1 day.
I've run into the same problem, not looked into it yet, but I'm about too... But basically, my Paypal IPN would do shit twice...
Link to comment
Share on other sites

I think I found the problem but not sure until tomorrow. but I had a mod that ran a cron the same as my day cron so what it was doing was running everything twice. making it fun twice as fast. I have removed the mod and the cron not everything is running at normal speed however I can't tell about the donators day till tomorrow.

Link to comment
Share on other sites

I think I found the problem but not sure until tomorrow. but I had a mod that ran a cron the same as my day cron so what it was doing was running everything twice. making it fun twice as fast. I have removed the mod and the cron not everything is running at normal speed however I can't tell about the donators day till tomorrow.
The best way to get around that is to make a test page that has the same code as your cron_day, but comment out this line

if($_GET['code'] != $_CONFIG['code']) { die("....."); }

 

Beware, this is only for testing and development purposes. If you use this on a live game, then whatever the cron script was supposed to run, will run when you execute this script (pending that it actually works).

Link to comment
Share on other sites

I got it working fine now. like I said, one of the mods I was running used a cron, but instead of adding the cron to what ever job it needed to run it (in my case the cron_day) it had its own cron. which meant I was running two crons side by side doing the same job. which made it all run twice as fast. I removed the mod and the cron. since then everything has been running great.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...