RogerB Posted July 24, 2012 Report Share Posted July 24, 2012 Mark, a while back you made a post about flight report delay with kacars. You removed the listener for top pilots and made it a cron. Can you share how you did that? Quote Link to comment Share on other sites More sharing options...
Moderators joeri Posted July 24, 2012 Moderators Report Share Posted July 24, 2012 http://forum.phpvms.net/topic/6776-filing-pireps-delays-solved/#entry50916 isn't this what you are looking for Quote Link to comment Share on other sites More sharing options...
RogerB Posted July 25, 2012 Author Report Share Posted July 25, 2012 That code isn't doing the trick, since I removed the listener and cronned that code it's still not working. I'm getting a sytax error and top pilot isn't updating now. Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted July 25, 2012 Report Share Posted July 25, 2012 Roger, Sorry but I do not use the module. I am sure that Mark should be able to help you out. Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted July 26, 2012 Moderators Report Share Posted July 26, 2012 HI Roger yes it wasn't specific to kACARS it was when any pirep was filed. I tracked it down to the top pilot module, I think David was going to release a fix for it not sure if he updated or not yet. Basically this is what i did, removed the listener >Core>Modules>TopPilot like this at the top section, <?php //by:simpilot //www.simpilotgroup.com class TopPilot extends CodonModule { public $title = 'Top Pilots'; //public function __construct() { // CodonEvent::addListener('TopPilot', array('pirep_filed')); //} public function EventListener($eventinfo) { if($eventinfo[0] == 'pirep_filed') { self::refresh_pilot_stats(); } } Then i put that function in to a php file in the admin directory, <?php define('ADMIN_PANEL', true); include dirname(dirname(__FILE__)).'/core/codon.config.php'; Auth::$userinfo->pilotid = 0; /* error_reporting(E_ALL); ini_set('display_errors', 'on'); */ set_time_limit(0); ini_set('memory_limit', '-1'); TopPilot::refresh_pilot_stats(); echo 'Top Pilot Stats Updated'; ?> Then set up the cron the same way as its usually run for maintenance. php -f /srv/www/xxx/xxx/admin/YOUR_FILE_NAME.php Just change the YOUR_FILE_NAME.php to whatever you call the file you create and should be good to go. Quote Link to comment Share on other sites More sharing options...
RogerB Posted July 26, 2012 Author Report Share Posted July 26, 2012 Thanks Mark, think I got it. Quote Link to comment Share on other sites More sharing options...
RogerB Posted July 26, 2012 Author Report Share Posted July 26, 2012 Getting a message no input file selected...I have never run a cron before so I'm totally lost. I'll do some reading up. Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted July 26, 2012 Moderators Report Share Posted July 26, 2012 Ok so first thing call the page directly in your browser to see if it works, then you can add it as a cron or a timed script, there are other ways to get that to run without a cron if you dint have access. Quote Link to comment Share on other sites More sharing options...
RogerB Posted July 26, 2012 Author Report Share Posted July 26, 2012 I got it, had the path wrong. works now. Thanks Mark!! Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted July 26, 2012 Moderators Report Share Posted July 26, 2012 Glad to help Roger. Quote Link to comment Share on other sites More sharing options...
Cor Posted July 27, 2012 Report Share Posted July 27, 2012 Tnx Mark, Works very good Regards, Cor 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.