Completed
Push — v3-ssp ( bdeb17...167089 )
by Sam
01:48
created

UpdateSilverStripeVersionsCron   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 22
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getSchedule() 0 4 1
A process() 0 4 1
1
0 ignored issues
show
Security Bug introduced by
It is not recommended to output anything before PHP's opening tag in non-template files.
Loading history...
2
<?php
3
4
class UpdateSilverStripeVersionsCron implements CronTask
5
{
6
7
    /**
8
     * Run hourly, on the 20min mark
9
     *
10
     * @return string
11
     */
12
    public function getSchedule()
13
    {
14
        return "20 * * * *";
15
    }
16
17
    /**
18
     * Run the build task UpdateSilverStripeVersionsTask
19
     * @return void
20
     */
21
    public function process() {
22
        $task = Injector::inst()->get('UpdateSilverStripeVersionsTask');
23
        $task->run(new SS_HTTPRequest('GET', '/'));
24
    }
25
}
26