-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
45 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
/** | ||
* Created by PhpStorm. | ||
* User: exodu | ||
* 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); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters