Okay, heres my setup i have so far.... I downloaded PuTTY last night, logged in and everything... typed crontab -l (to make sure i didn't have any existing cronjobs) none were found SO i procceeded to create the file named "run_cron.pl" with the following data in it: */5 * * * * /usr/local/bin/php /home/stevoboi/cgi-bin/tick.php (tick.php is a tick file for my online game, needs to run for every 5 minutes, updates all of the players) saved to file as "run_cron.pl" and uploaded it to my /home/stevoboi/bin/ directory THEN i went back to PuTTY and typed this cd bin ::Went to my /bin/ folder:: typed crontab run_cron.pl Surprisingly, it didn't have any errors after i hit enter, and i thought it would work... Well, after every 5 minutes, nothing was happening... i added the following to the top of my tick.php page : #!/usr/bin/php -q i can run the tick.php in the browser and have it META refresh every 300 secs, but that gets old... looking for better more secure way... ANY SUGGESTIONS??? I REALLY NEED HELP!
Are you logged in as user or root user? You should type crontab -e and put the following line. */5 * * * * /usr/local/bin/php /home/stevoboi/cgi-bin/tick.php After which, type crontab -l to make sure that you have listed it.
yeah, i have done this, i typed crontab -e the ~ suiqqlies on the left and added the following line */5 * * * * /usr/local/bin/php /home/stevoboi/cgi-bin/tick.php and i dont know what the difference is between root user and user... i have logged in to my server via PuTTY with my client and username and password, yes, if thats what u mean, but still.... i typed crontab -l and it popped up the line of code..... unfortunately, it dooes nothing... could it be because i have the tick.php to where it outputs the text "Updated <?php echo $player_name; ?>" it gives me a list of all the players updated when i view it via browser... could that be a problem with cron?
There is a few cause to your problem. 1) Cron services is not started 2) wrong php binary You should not output text for cron job.
YES!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! I GOT IT! thanks for the help! I'm def recommending you guys to others with problems. my ticks are now automated through cron, and i love it this rocks, i'll be sure to post more often here and answer some php/mysql questions and i'll def ask ya guys if i have more questions.
hey m8s, i was wonderin if i could post a link to my game here for a few days so a few peeps could check it out and lemme know what i need done? we've fixed ALOT of bugs in it, and got the cron workin (thanks to you guys) just lemme know if its cool, not tryin to compete