I know I am bit late but I would like to leave another solution, maybe it help other people, you could run the file in cron if you have your business rule inside model
By creating a file in the public folder with the content below. Ex.: cron.php
<?php
// Define path to application directory
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
// Define application environment
defined('APPLICATION_ENV')
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'development'));
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../library'),
get_include_path(),
)));
/** Zend_Application */
require_once 'Zend/Application.php';
// Create application, bootstrap, and run
$application = new Zend_Application(
APPLICATION_ENV,
APPLICATION_PATH . '/configs/application.ini'
);
$application->bootstrap();
$model = new Application_Model_Name();
$model->runTask();
Then add a cron tab entry
0 0,12 * * * php /path/to/your/project/cron.php
It should work better than first answer since you will run using PHP CLI then you won't have execution time limit of php script, in case of your script takes more than one minute and you don't need network connection to run that cron job