Files
pathfinder/app/main/cron/abstractcron.php
Mark Friedrich a33615445e - new "_NPC faction_" added for k-space systems, closed #773
- improved file structure for _Model_ classes (`app/main/model/..`). Group by database name
- improved database connection handling (fixed persistent DB connections)
2019-04-12 21:34:29 +02:00

27 lines
672 B
PHP

<?php
/**
* Created by PhpStorm.
* User: Exodus 4D
* Date: 17.06.2018
* Time: 12:13
*/
namespace cron;
abstract class AbstractCron {
// default max_execution_time for cronJobs
// -> should be less then execution period
const DEFAULT_MAX_EXECUTION_TIME = 50;
/**
* set max execution time for cronjobs
* -> Default CLI execution time is "0" -> infinite!
* php.ini settings are ignored! http://php.net/manual/en/info.configuration.php#ini.max-execution-time
* @param int $time
*/
protected function setMaxExecutionTime(int $time = self::DEFAULT_MAX_EXECUTION_TIME){
ini_set('max_execution_time', $time);
}
}