phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] property/inc/custom/cron.php, 1.1.2.1


From: nomail
Subject: [Phpgroupware-cvs] property/inc/custom/cron.php, 1.1.2.1
Date: Mon, 13 Dec 2004 17:09:09 +0100

Update of /property/inc/custom
Added Files:
        Branch: proposed-0_9_18-branch
          cron.php

date: 2004/12/13 16:09:09;  author: sigurdne;  state: Exp;  lines: +59 -0

Log Message:
no message
=====================================================================
#!/usr/bin/php -q
<?php
        /**
        * phpGroupWare - property
        * address@hidden http://www.phpgroupware.org}
        *
        * Property: a Facilities Management System.
        *
        * Copyright 2000 - 2003 Free Software Foundation, Inc
        * This program is part of the GNU project, see address@hidden 
http://www.gnu.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.
        *
        * To contact the author write to address@hidden mailto:address@hidden 
Sigurd Nes}
        * @author Sigurd Nes
        * @package property
        * @subpackage admin
        * @version $Id: cron.php,v 1.1.2.1 2004/12/13 16:09:09 sigurdne Exp $
        */

        /**
         * Description
         * @package property
         * example cron : /usr/local/bin/php -q 
/var/www/html/phpgroupware/property/inc/custom/cron.php default 
oppdater_namssakstatus_pr_leietaker
         */

        $path_to_phpgroupware = dirname(__FILE__) . '/../../..';        // need 
to be adapted if this script is moved somewhere else
        $_GET['domain'] = isset($_SERVER['argv'][1]) ? $_SERVER['argv'][1] : 
'default';


        if(!$function = $_SERVER['argv'][2])

        {
                echo date('Y/m/d H:i:s ') . " Nothing to execute\n";
                return;
        }

//      echo $function;

        $GLOBALS['phpgw_info']['flags'] = array(
                'currentapp' => 'login',
                'noapi'      => True            // this stops header.inc.php to 
include phpgwapi/inc/function.inc.php
        );
        include($path_to_phpgroupware.'/header.inc.php');
        unset($GLOBALS['phpgw_info']['flags']['noapi']);

        $db_type = $GLOBALS['phpgw_domain'][$_GET['domain']]['db_type'];

        $GLOBALS['phpgw_info']['server']['sessions_type'] = 'db';

        include(PHPGW_API_INC.'/functions.inc.php');

        $num = ExecMethod('property.custom_functions.index',array('function' => 
$function,'enabled'=>1));
        // echo date('Y/m/d H:i:s ').$_GET['domain'].': '.($num ? "$num job(s) 
executed" : 'Nothing to execute')."\n";

        $GLOBALS['phpgw']->common->phpgw_exit();




reply via email to

[Prev in Thread] Current Thread [Next in Thread]