mirror of
https://github.com/atlanticbiomedical/portal-legacy.git
synced 2025-07-02 01:47:28 -04:00
initial commit
This commit is contained in:
24
data/symfony/skeleton/batch/default.php
Executable file
24
data/symfony/skeleton/batch/default.php
Executable file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* ##BATCH_NAME## batch script
|
||||
*
|
||||
* Here goes a brief description of the purpose of the batch script
|
||||
*
|
||||
* @package ##PROJECT_NAME##
|
||||
* @subpackage batch
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
define('SF_ROOT_DIR', realpath(dirname(__file__).'/..'));
|
||||
define('SF_APP', '##APP_NAME##');
|
||||
define('SF_ENVIRONMENT', '##ENV_NAME##');
|
||||
define('SF_DEBUG', ##DEBUG##);
|
||||
|
||||
require_once(SF_ROOT_DIR.DIRECTORY_SEPARATOR.'apps'.DIRECTORY_SEPARATOR.SF_APP.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'config.php');
|
||||
|
||||
// initialize database manager
|
||||
//$databaseManager = new sfDatabaseManager();
|
||||
//$databaseManager->initialize();
|
||||
|
||||
// batch process here
|
23
data/symfony/skeleton/batch/rotate_log.php
Executable file
23
data/symfony/skeleton/batch/rotate_log.php
Executable file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Log rotation batch script
|
||||
*
|
||||
* This script is used to manage log rotation, and should be called automatically by a cron task daily
|
||||
*
|
||||
* @package ##PROJECT_NAME##
|
||||
* @subpackage batch
|
||||
* @version $Id: rotate_log.php 3148 2007-01-04 19:34:28Z fabien $
|
||||
*/
|
||||
|
||||
define('SF_ROOT_DIR', realpath(dirname(__file__).'/..'));
|
||||
define('SF_APP', '##APP_NAME##');
|
||||
define('SF_ENVIRONMENT', '##ENV_NAME##');
|
||||
define('SF_DEBUG', ##DEBUG##);
|
||||
|
||||
require_once(SF_ROOT_DIR.DIRECTORY_SEPARATOR.'apps'.DIRECTORY_SEPARATOR.SF_APP.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'config.php');
|
||||
|
||||
if (sfConfig::get('sf_logging_enabled') && sfConfig::get('sf_logging_rotate'))
|
||||
{
|
||||
sfLogManager::rotate(SF_APP, SF_ENVIRONMENT, sfConfig::get('sf_logging_period'), sfConfig::get('sf_logging_history'));
|
||||
}
|
Reference in New Issue
Block a user