mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR added better handling of pages that result in no URLSegment
MINOR added QuarterHourly scheduled tasks, tidied documentation a little bit git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84569 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
a79452e23a
commit
e7e0e9424d
@ -1290,7 +1290,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
$t = str_replace('&','-and-',$t);
|
||||
$t = ereg_replace('[^A-Za-z0-9]+','-',$t);
|
||||
$t = ereg_replace('-+','-',$t);
|
||||
if(!$t) {
|
||||
if(!$t || $t == '-' || $t == '-1') {
|
||||
$t = "page-$this->ID";
|
||||
}
|
||||
return $t;
|
||||
|
15
tasks/QuarterHourlyTask.php
Normal file
15
tasks/QuarterHourlyTask.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
/**
|
||||
* Classes that must be run quarter hourly extend this class
|
||||
*
|
||||
* Please note: Subclasses of this task aren't extecuted automatically,
|
||||
* they need to be triggered by an external automation tool like unix cron.
|
||||
* See {@link ScheduledTask} for details.
|
||||
*
|
||||
* @package sapphire
|
||||
* @subpackage cron
|
||||
*/
|
||||
class QuarterHourlyTask extends ScheduledTask {
|
||||
|
||||
}
|
||||
?>
|
@ -7,8 +7,11 @@
|
||||
*
|
||||
* Example Cron:
|
||||
* <code>
|
||||
* # Quarter-hourly task (every hour at 25 minutes past) (remove space between first * and /15)
|
||||
* * /15 * * * * www-data /my/webroot/sapphire/cli-script.php /QuarterlyHourlyTask > /var/log/silverstripe_quarterhourlytask.log
|
||||
*
|
||||
* # HourlyTask (every hour at 25 minutes past)
|
||||
* 25 * * * * www-data /my/webroot/sapphire/cli-script.php /DailyTask > /var/log/silverstripe_dailytask.log
|
||||
* 25 * * * * www-data /my/webroot/sapphire/cli-script.php /HourlyTask > /var/log/silverstripe_hourlytask.log
|
||||
*
|
||||
* # DailyTask (every day at 6:25am)
|
||||
* 25 6 * * * www-data /my/webroot/sapphire/cli-script.php /DailyTask > /var/log/silverstripe_dailytask.log
|
||||
|
Loading…
Reference in New Issue
Block a user