Boardsync and cron jobs

paul greavy
Joined: 31 Mar 2005

Boardsync and cron jobs

Posted:18 Apr 2010 (09:00 UTC)
I've been trying to work out how a cron job syncs a board with a mailing list. Or rather, I can see that boardsync_cron.php runs board_sync_run(), but AFAICT nothing actually sets up the cron job so this function is never executed.

Is this something that has to be setup manually, or am I missing something?
spiderr
Profile Picture
Joined: 08 Feb 2004

Re: Boardsync and cron jobs

Posted:21 Apr 2010 (15:42 UTC)
yes, scheduling of the cron job needs to be done just like you would schedule and recurring script on your server.
paul greavy
Joined: 31 Mar 2005

Re: Boardsync and cron jobs

Posted:30 Apr 2010 (13:23 UTC)
Thanks.

I ended up putting something like this in /etc/cron.d:


# Sync boards with mailing lists every five minutes
*/5 * * * * root /usr/bin/php -f /srv/www/htdocs/boards/admin/boardsync_cron.php


Curiously, when running on my dev box I had no errors. On my production server I kept getting this:

Fatal error: Class 'LibertyComment' not found in /srv/www/htdocs/boards/admin/boardsync_inc.php on line 405

AFAICT both boxes should have had an identical config so it beats me why the sync should run without error on one and not the other. Anyway, I fixed the problem by adding:

<?php
require_once( LIBERTY_PKG_PATH.'LibertyComment.php' );
?>

to boardsync_inc.php and all is now well.
  Page 1 of 1  1