@@ -111,39 +111,39 @@ If a task completes before the TTL expires, the lock is released immediately. Th
111111There are a number of ways available to specify how often the task is called.
112112
113113
114- | Method | Description |
115- | :----------------------------------------------- | :--------------------------------------------------------------------|
116- | ` ->cron('* * * * *') ` | Run on a custom cron schedule. |
117- | ` ->daily('4:00 am') ` | Runs daily at 12:00am, unless a time string is passed in. |
118- | ` ->hourly() / ->hourly(15) ` | Runs at the top of every hour or at specified minute. |
119- | ` ->everyHour(3, 15) ` | Runs every 3 hours at XX:15. |
120- | ` ->betweenHours(6,12) ` | Runs between hours 6 and 12. |
121- | ` ->hours([0,10,16]) ` | Runs at hours 0, 10 and 16. |
122- | ` ->everyMinute(20) ` | Runs every 20 minutes. |
123- | ` ->betweenMinutes(0,30) ` | Runs between minutes 0 and 30. |
124- | ` ->minutes([0,20,40]) ` | Runs at specific minutes 0,20 and 40. |
125- | ` ->everyFiveMinutes() ` | Runs every 5 minutes (12:00, 12:05, 12:10, etc) |
126- | ` ->everyFifteenMinutes() ` | Runs every 15 minutes (12:00, 12:15, etc) |
127- | ` ->everyThirtyMinutes() ` | Runs every 30 minutes (12:00, 12:30, etc) |
128- | ` ->days([0,3]) ` | Runs only on Sunday and Wednesday ( 0 is Sunday , 6 is Saturday ) |
129- | ` ->sundays('3:15am') ` | Runs every Sunday at midnight, unless time passed in. |
130- | ` ->mondays('3:15am') ` | Runs every Monday at midnight, unless time passed in. |
131- | ` ->tuesdays('3:15am') ` | Runs every Tuesday at midnight, unless time passed in. |
132- | ` ->wednesdays('3:15am') ` | Runs every Wednesday at midnight, unless time passed in. |
133- | ` ->thursdays('3:15am') ` | Runs every Thursday at midnight, unless time passed in. |
134- | ` ->fridays('3:15am') ` | Runs every Friday at midnight, unless time passed in. |
135- | ` ->saturdays('3:15am') ` | Runs every Saturday at midnight, unless time passed in. |
136- | ` ->monthly('12:21pm') ` | Runs the first day of every month at 12:00am unless time passed in. |
137- | ` ->daysOfMonth([1,15]) ` | Runs only on days 1 and 15. |
138- | ` ->everyMonth(4) ` | Runs every 4 months. |
139- | ` ->betweenMonths(4,7) ` | Runs between months 4 and 7. |
140- | ` ->months([1,7]) ` | Runs only on January and July. |
141- | ` ->quarterly('5:00am') ` | Runs the first day of each quarter (Jan 1, Apr 1, July 1, Oct 1) |
142- | ` ->yearly('12:34am') ` | Runs the first day of the year. |
143- | ` ->weekdays('1:23pm') ` | Runs M-F at 12:00 am unless time passed in. |
144- | ` ->weekends('2:34am') ` | Runs Saturday and Sunday at 12:00 am unless time passed in. |
145- | ` ->environments('local', 'prod') ` | Restricts the task to run only in the specified environments. |
146- | ` ->singleInstances () / ->singleInstance(HOUR) ` | Prevents concurrent executions of the same task. |
114+ | Method | Description |
115+ | :----------------------------------------------| :--------------------------------------------------------------------|
116+ | ` ->cron('* * * * *') ` | Run on a custom cron schedule. |
117+ | ` ->daily('4:00 am') ` | Runs daily at 12:00am, unless a time string is passed in. |
118+ | ` ->hourly() / ->hourly(15) ` | Runs at the top of every hour or at specified minute. |
119+ | ` ->everyHour(3, 15) ` | Runs every 3 hours at XX:15. |
120+ | ` ->betweenHours(6,12) ` | Runs between hours 6 and 12. |
121+ | ` ->hours([0,10,16]) ` | Runs at hours 0, 10 and 16. |
122+ | ` ->everyMinute(20) ` | Runs every 20 minutes. |
123+ | ` ->betweenMinutes(0,30) ` | Runs between minutes 0 and 30. |
124+ | ` ->minutes([0,20,40]) ` | Runs at specific minutes 0,20 and 40. |
125+ | ` ->everyFiveMinutes() ` | Runs every 5 minutes (12:00, 12:05, 12:10, etc) |
126+ | ` ->everyFifteenMinutes() ` | Runs every 15 minutes (12:00, 12:15, etc) |
127+ | ` ->everyThirtyMinutes() ` | Runs every 30 minutes (12:00, 12:30, etc) |
128+ | ` ->days([0,3]) ` | Runs only on Sunday and Wednesday ( 0 is Sunday , 6 is Saturday ) |
129+ | ` ->sundays('3:15am') ` | Runs every Sunday at midnight, unless time passed in. |
130+ | ` ->mondays('3:15am') ` | Runs every Monday at midnight, unless time passed in. |
131+ | ` ->tuesdays('3:15am') ` | Runs every Tuesday at midnight, unless time passed in. |
132+ | ` ->wednesdays('3:15am') ` | Runs every Wednesday at midnight, unless time passed in. |
133+ | ` ->thursdays('3:15am') ` | Runs every Thursday at midnight, unless time passed in. |
134+ | ` ->fridays('3:15am') ` | Runs every Friday at midnight, unless time passed in. |
135+ | ` ->saturdays('3:15am') ` | Runs every Saturday at midnight, unless time passed in. |
136+ | ` ->monthly('12:21pm') ` | Runs the first day of every month at 12:00am unless time passed in. |
137+ | ` ->daysOfMonth([1,15]) ` | Runs only on days 1 and 15. |
138+ | ` ->everyMonth(4) ` | Runs every 4 months. |
139+ | ` ->betweenMonths(4,7) ` | Runs between months 4 and 7. |
140+ | ` ->months([1,7]) ` | Runs only on January and July. |
141+ | ` ->quarterly('5:00am') ` | Runs the first day of each quarter (Jan 1, Apr 1, July 1, Oct 1) |
142+ | ` ->yearly('12:34am') ` | Runs the first day of the year. |
143+ | ` ->weekdays('1:23pm') ` | Runs M-F at 12:00 am unless time passed in. |
144+ | ` ->weekends('2:34am') ` | Runs Saturday and Sunday at 12:00 am unless time passed in. |
145+ | ` ->environments('local', 'prod') ` | Restricts the task to run only in the specified environments. |
146+ | ` ->singleInstance () / ->singleInstance(HOUR) ` | Prevents concurrent executions of the same task. |
147147
148148
149149These methods can be combined to create even more nuanced timings:
0 commit comments