Follow us on Twitter!
It is never to LATE to become what you never WERE.
Friday, April 18, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 25
Guests Online: 24
Members Online: 1

Registered Members: 82826
Newest Member: Jakob
Latest Articles
View Thread

HellBound Hackers | Computer General | Webmasters Lounge

Author

Cron Jobs

alldatizholy
Member

Your avatar

Posts: 41
Location: Colorado Springs, CO
Joined: 11.06.07
Rank:
Newbie
Warn Level: 5
Posted on 26-08-08 22:50
i really need help with crons, i need to make it so my members get back life once 5 mins have been up and its not happening, can someone please tell me what i could do to fix this? here is of the code
Code
<?php
include "config.php";
global $_CONFIG;
if($_GET['code'] != $_CONFIG['code']) { die(""); }
define("MONO_ON", 1);
require "class/class_db_{$_CONFIG['driver']}.php";
$db=new database;
$db->configure($_CONFIG['hostname'],
 $_CONFIG['username'],
 $_CONFIG['password'],
 $_CONFIG['database'],
 $_CONFIG['persistent']);
$db->connect();
$c=$db->connection_id;
$set=array();
$settq=$db->query("SELECT * FROM settings");
while($r=$db->fetch_row($settq))
{
$set[$r['conf_name']]=$r['conf_value'];
}
//brave update
$query="UPDATE users SET brave=brave+((maxbrave/10)+0.5) WHERE brave<maxbrave ";
$query2="UPDATE users SET brave=maxbrave WHERE brave>maxbrave";
$query3="UPDATE users SET hp=hp+(maxhp/3) WHERE hp<maxhp";
$query4="UPDATE users SET hp=maxhp WHERE hp>maxhp";
$db->query($query);
$db->query($query2);
$db->query($query3);
$db->query($query4);
//enerwill update
$query="UPDATE users SET energy=energy+(maxenergy/(12.5)) WHERE energy<maxenergy AND donatordays=0";
$query5="UPDATE users SET energy=energy+(maxenergy/(6)) WHERE energy<maxenergy AND donatordays>0";
$query2="UPDATE users SET energy=maxenergy WHERE energy>maxenergy";
$query3="UPDATE users SET will=will+10 WHERE will<maxwill";
$query4="UPDATE users SET will=maxwill WHERE will>maxwill";
$db->query($query);
$db->query($query5);
$db->query($query2);
$db->query($query3);
$db->query($query4);
if($set['validate_period'] == 5 && $set['validate_on'])
{
$db->query("UPDATE users SET verified=0");
}
if($set['validate_period'] == 15 && $set['validate_on'] && in_array(date('i'),array("00", "15", "30", "45")))
{
$db->query("UPDATE users SET verified=0");
}
?>


aciddrop808 http://www.angelicpainta2.webs.com
Author

RE: Cron Jobs

Mr_Cheese




Posts: 2468
Location: Brighton, UK
Joined: 30.11.04
Rank:
Uber Elite
Posted on 26-08-08 22:53
what does crontab -l look like? maybe you got the cronjob line wrong?
http://www.hellboundhackers.org/
Author

RE: Cron Jobs

alldatizholy
Member

Your avatar

Posts: 41
Location: Colorado Springs, CO
Joined: 11.06.07
Rank:
Newbie
Warn Level: 5
Posted on 26-08-08 23:11
i have no idea where that is so i take it thats my problem.....now to figure out where and what that is

Edited by alldatizholy on 27-08-08 01:10
aciddrop808 http://www.angelicpainta2.webs.com
Author

RE: Cron Jobs


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 27-08-08 01:13
Your CPanel should give you access to your crons... unless you're running your own web server, in which case the crontab command in a local terminal would work (if you're running it on Linux). Also, slightly OT... why are you using PEAR? Unless you're using a RDBMS other than MySQL, just use regular PHP.

You should explain your environment more to get meaningful help.


Author

RE: Cron Jobs

alldatizholy
Member

Your avatar

Posts: 41
Location: Colorado Springs, CO
Joined: 11.06.07
Rank:
Newbie
Warn Level: 5
Posted on 27-08-08 01:23
this is what the cron job looks like now, oh and btw i just looked at it....i just changed the ***** to 00*** for the cron day so thats fixed

i113.photobucket.com/albums/n228/demonix8o8/pic.jpg

Edited by alldatizholy on 27-08-08 01:33
aciddrop808 http://www.angelicpainta2.webs.com
Author

RE: Cron Jobs


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 27-08-08 01:31
Why are you passing a query string into your cron jobs? Not that that would be the problem... just curious.

Looks like your every 5 min cron is set up right... not sure what the problem is, unless your script is off. Do you get any sign that the cron job is actually running as scheduled? Like, the usual email?

Edit: Yep, it's your code. Quit putting semi-colons after the strings you're passing into functions. Like this...

$settq=$db->query("SELECT * FROM settings";);

... and the die at the top, and probably a few others.




Edited by on 27-08-08 01:34
Author

RE: Cron Jobs

alldatizholy
Member

Your avatar

Posts: 41
Location: Colorado Springs, CO
Joined: 11.06.07
Rank:
Newbie
Warn Level: 5
Posted on 27-08-08 01:38
ok so what should i do? cause im so damn lost right now its not even funny

Edited by alldatizholy on 27-08-08 01:40
aciddrop808 http://www.angelicpainta2.webs.com
Author

RE: Cron Jobs


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 27-08-08 02:52
alldatizholy wrote:
ok so what should i do? cause im so damn lost right now its not even funny


Well, first, you should read my fucking post so you can see what the problem is. Next... you should fix the problem.

If you don't have the PHP knowledge to fix a simple, repeated syntax mistake, then you need to close out of your CPanel and your pirated copy of Dreamweaver and re-learn the basics.


Author

RE: Cron Jobs

alldatizholy
Member

Your avatar

Posts: 41
Location: Colorado Springs, CO
Joined: 11.06.07
Rank:
Newbie
Warn Level: 5
Posted on 27-08-08 03:12
ur an asshole....fuck off man i asked for help and people like u act all bad cause u have knowledge.....
aciddrop808 http://www.angelicpainta2.webs.com
Author

RE: Cron Jobs

Futility
Member



Posts: 725
Location: USA
Joined: 17.12.07
Rank:
God
Posted on 27-08-08 03:15
And yet you decide to insult him and act like an idiot rather than appealing to his better side and getting some of that knowledge out of him... Good choice.


i252.photobucket.com/albums/hh11/zanimabean/Zim.png
Futility91@hotmail.com Futility91
Author

RE: Cron Jobs

alldatizholy
Member

Your avatar

Posts: 41
Location: Colorado Springs, CO
Joined: 11.06.07
Rank:
Newbie
Warn Level: 5
Posted on 27-08-08 03:17
like i said, im confused and i need help and what does he do....he acts like an ass, ive been looking it up for a while now and im confused, all i wanted was some better explained help
aciddrop808 http://www.angelicpainta2.webs.com
Author

RE: Cron Jobs


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 27-08-08 03:20
alldatizholy wrote:
ur an asshole....fuck off man i asked for help and people like u act all bad cause u have knowledge.....


Oh, okay... like I haven't heard that before when I've helped someone that prefers a good spoon-feed. Seriously, you want it explained simpler than this...

Zephyr_Pure wrote:
Quit putting semi-colons after the strings you're passing into functions.


If it gets any simpler than that, your brain will shut down. So, go fix your fucking code and die in a hole, you ungrateful little shithead.


Author

RE: Cron Jobs


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 27-08-08 03:23
Yeah; he told you pretty plainly. If you can't fix that, you shouldn't even be looking at the code at all.