File tree Expand file tree Collapse file tree 2 files changed +34
-1
lines changed
src/Illuminate/Console/Scheduling Expand file tree Collapse file tree 2 files changed +34
-1
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,36 @@ public function everyMinute()
81
81
return $ this ->spliceIntoPosition (1 , '* ' );
82
82
}
83
83
84
+ /**
85
+ * Schedule the event to run every two minutes.
86
+ *
87
+ * @return $this
88
+ */
89
+ public function everyTwoMinutes ()
90
+ {
91
+ return $ this ->spliceIntoPosition (1 , '*/2 ' );
92
+ }
93
+
94
+ /**
95
+ * Schedule the event to run every three minutes.
96
+ *
97
+ * @return $this
98
+ */
99
+ public function everyThreeMinutes ()
100
+ {
101
+ return $ this ->spliceIntoPosition (1 , '*/3 ' );
102
+ }
103
+
104
+ /**
105
+ * Schedule the event to run every four minutes.
106
+ *
107
+ * @return $this
108
+ */
109
+ public function everyFourMinutes ()
110
+ {
111
+ return $ this ->spliceIntoPosition (1 , '*/4 ' );
112
+ }
113
+
84
114
/**
85
115
* Schedule the event to run every five minutes.
86
116
*
Original file line number Diff line number Diff line change @@ -28,8 +28,11 @@ public function testEveryMinute()
28
28
$ this ->assertSame ('* * * * * ' , $ this ->event ->everyMinute ()->getExpression ());
29
29
}
30
30
31
- public function testEveryFiveMinutes ()
31
+ public function testEveryXMinutes ()
32
32
{
33
+ $ this ->assertSame ('*/2 * * * * ' , $ this ->event ->everyTwoMinutes ()->getExpression ());
34
+ $ this ->assertSame ('*/3 * * * * ' , $ this ->event ->everyThreeMinutes ()->getExpression ());
35
+ $ this ->assertSame ('*/4 * * * * ' , $ this ->event ->everyFourMinutes ()->getExpression ());
33
36
$ this ->assertSame ('*/5 * * * * ' , $ this ->event ->everyFiveMinutes ()->getExpression ());
34
37
}
35
38
You can’t perform that action at this time.
0 commit comments