]> git.mxchange.org Git - mailer.git/commitdiff
Added cron.php:
authorRoland Häder <roland@mxchange.org>
Sun, 6 Jan 2013 21:35:28 +0000 (21:35 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 6 Jan 2013 21:35:28 +0000 (21:35 +0000)
- This script can be called from outside cron job script or being called from
  command-line (e.g. php /full/path/to/script/cron.php)
- The local script mode does not support parameters
- TODOs.txt updated

.gitattributes
DOCS/TODOs.txt
cron.php [new file with mode: 0644]

index 50cd70f0e6030160bb210fba7c402f7be5317205..1864306d4ec8ca317e2ad633e2f5b5970a76c9db 100644 (file)
@@ -96,6 +96,7 @@ DOCS/tpl-validator.php svneol=native#text/plain
 /birthday_confirm.php svneol=native#text/plain
 /click.php svneol=native#text/plain
 /confirm.php svneol=native#text/plain
+/cron.php svneol=native#text/plain
 /css.php svneol=native#text/plain
 /debug.php svneol=native#text/plain
 /doubler.php svneol=native#text/plain
index 222f22f2f16feb9ef0420e41ca70f9fb780e0d8d..ce8826bfa3c2b49ac3f45dec8ec4d695f534fd27 100644 (file)
@@ -3,6 +3,7 @@
 ./api.php:68:// @TODO Do stuff here
 ./autoreg.php:58:// @TODO Add processing of request here
 ./beg.php:175:                 // @TODO Opps, what is missing here???
+./cron.php:62:// @TODO Do stuff here
 ./inc/classes/cachesystem.class.php:516:       // @TODO Add support for more types which break in last else-block
 ./inc/config-functions.php:149:        // @TODO Make this all better... :-/
 ./inc/config-functions.php:325:                                        // @TODO Call setConfigEntry() somehow
diff --git a/cron.php b/cron.php
new file mode 100644 (file)
index 0000000..a3caa90
--- /dev/null
+++ b/cron.php
@@ -0,0 +1,68 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 06/03/2013 *
+ * ===================                          Last change: 06/03/2013 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : cron.php                                         *
+ * -------------------------------------------------------------------- *
+ * Short description : Cron job script for external/local call          *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Cronjob-Script fuer externen/lokalen Aufruf      *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * For more information visit: http://mxchange.org                      *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// XDEBUG call
+//* DEBUG: */ xdebug_start_trace();
+
+// Load security system
+require('inc/libs/security_functions.php');
+
+// Init start time
+$GLOBALS['__start_time'] = microtime(TRUE);
+
+/*
+ * Set output to "raw mode", proper module and prevent HTML headers/footers
+ * being sent.
+ */
+$GLOBALS['__output_mode'] = -1;
+$GLOBALS['__module']      = 'cron';
+$GLOBALS['__header_sent'] = 2;
+$GLOBALS['__footer_sent'] = 2;
+
+// Load config file
+require('inc/config-global.php');
+
+// Load header here
+loadIncludeOnce('inc/header.php');
+
+// @TODO Do stuff here
+
+// Footer
+loadIncludeOnce('inc/footer.php');
+
+// [EOF]
+?>