Isomerizer Posted September 22, 2007 Share Posted September 22, 2007 Quick Cron Guide Ok, this should help you understand crons. 1. Make sure crons are uploaded on your ftp server, under "crons\are\not\4u" (You can change this on a later date). (If there not there, Copy and paste them from your DBS folder there be under "files\crons\are\not\4u".) 2. Now lets open the mysql.php under crons and make sure the details are correct. If they are, Re-upload them onto your server. (Now that your crons are located correctly onto your FTP server, Open up C Panel, And click "Cron Jobs" or "Crontab/s".) 3. Select "Advanced (Unix Style)". Now keeping this window open, Go back to your DBS folder, and double click crons.txt. Change all the "yourgameurl.com" to your actual domain E.G: * * * * * curl http://amazon-survival.com/crons/are/no ... spital.php Once you've done that you'll notice 5 *'s or 5 numbers and *'s to the left of each domain.... These indicate what goes in each box... If you dont get this part. Heres some example screenshots that should help you understand how to do this bit... The text file should look like this.. And under "Cron Jobs" it should look like this... If its like that, it should work. (Dont forget to click "Commit Changes".) FAQ's: I cant find cron jobs or crontab's under my cpanel? "Your host does'nt support cron's" My cron's still don't work!? "Make sure mysql.php under cron's is correct" I don't have the cron's text file / Some cron's are missing? "You don't have a payed for version of DBS" If theres anything else your not sure on or some information that should of been included in this guide please tell me. Thanks and i hope this helps! Quote Link to comment Share on other sites More sharing options...
Doki` Posted September 22, 2007 Share Posted September 22, 2007 Re: Crons Guide *Happy thoughts* lol. Quote Link to comment Share on other sites More sharing options...
HITMAN 17 Posted September 23, 2007 Share Posted September 23, 2007 Re: Crons Guide can some one do them for me plz Quote Link to comment Share on other sites More sharing options...
Isomerizer Posted September 23, 2007 Author Share Posted September 23, 2007 Re: Crons Guide actually i think i know y its because i dont have a cron txt file FAQ's: I cant find cron jobs or crontab's under my cpanel? "Your host does'nt support cron's" My cron's still don't work!? "Make sure mysql.php under cron's is correct" I don't have the cron's text file / Some cron's are missing? "You don't have a payed for version of DBS" :| Quote Link to comment Share on other sites More sharing options...
HITMAN 17 Posted September 23, 2007 Share Posted September 23, 2007 Re: Crons Guide does it need * and 4 at the start of the command Quote Link to comment Share on other sites More sharing options...
HITMAN 17 Posted September 23, 2007 Share Posted September 23, 2007 Re: Crons Guide thnx isomer my first cron jobs lol thnx to u +1 thnx Quote Link to comment Share on other sites More sharing options...
HITMAN 17 Posted September 26, 2007 Share Posted September 26, 2007 Re: Crons Guide how do i do lite isomer explain plz Quote Link to comment Share on other sites More sharing options...
HITMAN 17 Posted February 9, 2008 Share Posted February 9, 2008 Re: Crons Guide by the way just to let ppl know this is v1 crons not v2 Quote Link to comment Share on other sites More sharing options...
jeeppimp Posted February 10, 2008 Share Posted February 10, 2008 Re: Crons Guide Hi all and this is my 2nd post so please have pitty on me! haha! I have mccode 2.0.2, i have it stalled, just can't get the crons too work.... The manual tells you to setup your crons like this */5 * * * * curl http://offroaddrifters.com/cron_fivemins.php?code=xxx but it no worky! haha. What would I be doing wrong? ****EDIT**** Figured it out!! I needed to put my config code where the xxx is, like so!( cron_fivemins.php?code=xxx ) Didn't know and this would be the first time setting up a game... Quote Link to comment Share on other sites More sharing options...
Vyp3r2oo9 Posted February 10, 2008 Share Posted February 10, 2008 Re: Crons Guide Have you never heard of editing your own post H1TMAN93 ... I mean wth - 4 Posts in a row Quote Link to comment Share on other sites More sharing options...
Godhand Posted February 10, 2008 Share Posted February 10, 2008 Re: Crons Guide Hi all and this is my 2nd post so please have pitty on me! haha! I have mccode 2.0.2, i have it stalled, just can't get the crons too work.... The manual tells you to setup your crons like this */5 * * * * curl http://offroaddrifters.com/cron_fivemins.php?code=xxx but it no worky! haha. What would I be doing wrong? Make sure your cron codes are right. Quote Link to comment Share on other sites More sharing options...
jeeppimp Posted February 10, 2008 Share Posted February 10, 2008 Re: Crons Guide It is now and it's working fine.... :mrgreen: Quote Link to comment Share on other sites More sharing options...
jeeppimp Posted February 17, 2008 Share Posted February 17, 2008 Re: Crons Guide Need some help please! My Fedjail isn't updating. This is what I have in daycron. V2.0 $db->query("UPDATE fedjail set fed_days=fed_days-1"); $q=$db->query("SELECT * FROM fedjail WHERE fed_days=0"); $ids=array(); while($r=$db->fetch_row($q)) { $ids[]=$r['fed_userid']; } if(count($ids) > 0) { My Cron is set to: 0 0 * * * curl http://offroaddrifters.com/cron_day.php ... db263a92b' Quote Link to comment Share on other sites More sharing options...
Isomerizer Posted February 18, 2008 Author Share Posted February 18, 2008 Re: Crons Guide This is what i use and it works fine.. mysql_query("UPDATE fedjail set fed_days=fed_days-1"); $q=mysql_query("SELECT * FROM fedjail WHERE fed_days=0"); $ids=array(); while($r=mysql_fetch_row($q)) { $ids[]=$r['fed_userid']; } if(count($ids) > 0) { mysql_query("UPDATE users SET fedjail=0 WHERE userid IN(".implode(",", $ids).")"); } mysql_query("DELETE FROM fedjail WHERE fed_days=0"); Quote Link to comment Share on other sites More sharing options...
jeeppimp Posted February 18, 2008 Share Posted February 18, 2008 Re: Crons Guide thanks I'll try it out... Quote Link to comment Share on other sites More sharing options...
jimmytubbs Posted February 23, 2008 Share Posted February 23, 2008 Re: Crons Guide hi ive tried your crons way and i have done msql.php right but my v1 crons still dont work can u help? Quote Link to comment Share on other sites More sharing options...
jeeppimp Posted February 23, 2008 Share Posted February 23, 2008 Re: Crons Guide for v1 I've done it that way also with no secess, I've added * * * * * curl, at the tale end of the link and it worked for me like so. * * * * * curl http://amazon-survival.com/crons/are/no ... spital.php * * * * * curl Not sure if its right or wrong but it worked... Quote Link to comment Share on other sites More sharing options...
jimmytubbs Posted February 24, 2008 Share Posted February 24, 2008 Re: Crons Guide cheers i will try it Quote Link to comment Share on other sites More sharing options...
Ragnar Posted April 10, 2008 Share Posted April 10, 2008 Re: [FAQ] Crons Guide Is this correct?? * * * * * curl http://w w.domain.com/cron_minute.php?code=XXX Located at /etc/crontab yet it's not doing anything. When I go to the actual URL, it runs!! Quote Link to comment Share on other sites More sharing options...
Analog Posted April 10, 2008 Share Posted April 10, 2008 Re: [FAQ] Crons Guide Is this correct?? * * * * * curl http://w w.domain.com/cron_minute.php?code=XXX Located at /etc/crontab yet it's not doing anything. When I go to the actual URL, it runs!! 1. Make sure you have the correct code entered for the cron job 2. Make sure you have the correct path to the cron file. Quote Link to comment Share on other sites More sharing options...
Guest Anonymous Posted April 10, 2008 Share Posted April 10, 2008 Re: [FAQ] Crons Guide [me=Nyna]coughs politely[/me] 3. Make sure curl itself is on the path - better still, explicitly specify it. 4. Consider adding these jobs to a user account *not* the machine's own crontab (which runs at root privileges) Quote Link to comment Share on other sites More sharing options...
Ragnar Posted April 10, 2008 Share Posted April 10, 2008 Re: [FAQ] Crons Guide Yes the code/URL is right. As I said, when I go to the actual URL, it runs and updates!! (That's the minute one, so the * are all correct. On the correct path to the file, it already had 01 * * * * root run-parts /etc/cron.hourly 02 23 * * * root run-parts /etc/cron.daily 22 4 * * 0 root run-parts /etc/cron.weekly 42 4 1 * * root run-parts /etc/cron.monthly which are all empty files. So I think this file is where it goes. For the curl stuff, would that be changing curl to some path? Does apache or the server need to be reset when you add a cron? (I did reset them after adding them.) Quote Link to comment Share on other sites More sharing options...
Floydian Posted April 10, 2008 Share Posted April 10, 2008 Re: [FAQ] Crons Guide Na, cron jobs can be added without reseting the server or restarting apache. Wish I could help more, but they always worked for me after getting the directory/file name right and after making sure the script worked correct, so I'll be looking out for an answer to this as well to file in my lil rolodex. lol Quote Link to comment Share on other sites More sharing options...
Ragnar Posted April 11, 2008 Share Posted April 11, 2008 Re: [FAQ] Crons Guide * * * * * root curl http://w w.domain.com/cron_minute.php?code=XXXX It needed the root added to it. Quote Link to comment Share on other sites More sharing options...
Guest Anonymous Posted April 11, 2008 Share Posted April 11, 2008 Re: [FAQ] Crons Guide That's dependent on a number of factors... The system-wide crontab requires the username, however personal crontabs don't. Personally, I feel that running any php job as root is dangerous. It gives the script highly elevated privileges which is never a good idea. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.