From e1dc0d3c99217504de2ac8467156274786efc0bd Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 9 Oct 2014 16:01:11 +0200 Subject: Big load of changes - Added callback functionality for taskmanager tasks. You can launch a task and define a callback function to be run when the task finished. This requires activating the cronjob - Added cron functionality: Add cronjob that calls the cron api every 5 minutes to use it. (See cron.inc.php) - Added eventlog - Added missing translations - Merged main-menu-login and main-menu-logout --- apis/cron.inc.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 apis/cron.inc.php (limited to 'apis/cron.inc.php') diff --git a/apis/cron.inc.php b/apis/cron.inc.php new file mode 100644 index 00000000..2d0fc66c --- /dev/null +++ b/apis/cron.inc.php @@ -0,0 +1,28 @@ + 86400 * 90"); + break; +case 2: + Database::exec("DELETE FROM eventlog WHERE (UNIX_TIMESTAMP() - dateline) > 86400 * 90"); + break; +case 3: + Database::exec("DELETE FROM property WHERE dateline <> 0 AND dateline < UNIX_TIMESTAMP()"); + break; +case 4: + Database::exec("DELETE FROM callback WHERE (UNIX_TIMESTAMP() - dateline) > 86400"); + break; +} + +Trigger::checkCallbacks(); -- cgit v1.2.3-55-g7522