[geeklog-cvs] geeklog-1.3/system lib-custom.php,1.14,1.15 lib-plugins.php,1.57,1.58
blaine at iowaoutdoors.org
blaine at iowaoutdoors.org
Fri Mar 25 22:03:09 EST 2005
Update of /var/cvs/geeklog-1.3/system
In directory www:/tmp/cvs-serv17046/system
Modified Files:
lib-custom.php lib-plugins.php
Log Message:
Added new API to allow plugins to run sheduled tasks or code. An internal GL cron process that won't be time sensitive as it's dependant on someone accessing the site to activate the code but should serve most requirements. Added new setting to set the interval between runs - $_CONF['cron_schedule_interval'].
Code will also check if there is a CUSTOM_runSheduledJob function as some blocks or non-plugins may have code to run as well.
Added new record to the vars table to hold that last UNIX_TIMESTAMP of when the Internal Cron check was last run.
Index: lib-custom.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/system/lib-custom.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** lib-custom.php 15 Feb 2005 10:02:17 -0000 1.14
--- lib-custom.php 26 Mar 2005 03:03:06 -0000 1.15
***************
*** 140,143 ****
--- 140,152 ----
+ /**
+ * Include any code in this function that will be called by the GL internal CRON Process
+ * The interval between runs is determined by $_CONF['cron_schedule_interval']
+ */
+ function CUSTOM_runSheduledJob() {
+
+ }
+
+
/* Sample Custom Member Functions to create and update Custom Membership registration and profile
Index: lib-plugins.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/system/lib-plugins.php,v
retrieving revision 1.57
retrieving revision 1.58
diff -C2 -d -r1.57 -r1.58
*** lib-plugins.php 29 Jan 2005 17:52:55 -0000 1.57
--- lib-plugins.php 26 Mar 2005 03:03:06 -0000 1.58
***************
*** 1336,1338 ****
}
! ?>
--- 1336,1356 ----
}
!
! /**
! * Check if plugins have a scheduled task they want to run
! * The interval between runs is determined by $_CONF['cron_schedule_interval']
! */
! function PLG_runScheduledJob ()
! {
! global $_PLUGINS;
!
! foreach ($_PLUGINS as $pi_name) {
! $function = 'plugin_runScheduledJob_' . $pi_name;
! if (function_exists ($function)) {
! echo " ... Exists";
! $function ();
! }
! }
! }
!
! ?>
\ No newline at end of file
More information about the geeklog-cvs
mailing list