Skip to content

Commit cc83984

Browse files
committed
Update scheduler-quartz.md
1 parent bdbb45b commit cc83984

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

docs/recipes/scheduler-quartz.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -131,51 +131,51 @@ Jobs are the tasks that will be executed according to a schedule. Each job confi
131131

132132
1. **URL Jobs**: Execute HTTP requests to internal or external URLs
133133

134-
```json
134+
```json
135135
{
136136
"label": "Call external API",
137137
"url": "https://api.example.com/endpoint",
138138
"interval": "3600"
139139
}
140-
```
140+
```
141141

142142
2. **Internal Path Jobs**: Execute a path local to the server (important for proper load balancing in clusters)
143143

144-
```json
144+
```json
145145
{
146146
"label": "Process local data",
147147
"url": "/jobs/process-data.cfm",
148148
"cron": "0 0 * * * ?"
149149
}
150-
```
150+
```
151151

152152
3. **Component Jobs**: Execute a CFML component
153153

154-
```json
154+
```json
155155
{
156156
"label": "Database maintenance",
157157
"component": "com.example.tasks.DatabaseMaintenance",
158158
"cron": "0 0 3 * * ?",
159159
"mode": "singleton",
160160
"dbName": "users"
161161
}
162-
```
162+
```
163163

164164
#### Scheduling Options
165165

166166
1. **Simple Interval**: Specify execution frequency in seconds
167167

168-
```json
168+
```json
169169
"interval": "60" // Execute every 60 seconds
170-
```
170+
```
171171

172172
2. **Cron Expression**: Use powerful cron syntax for complex schedules
173173

174-
```json
174+
```json
175175
"cron": "0 0 9-17 ? * MON-FRI" // Every hour from 9am-5pm on weekdays
176-
```
176+
```
177177

178-
> **Tip**: Creating cron expressions can be challenging. AI tools like Google, ChatGPT, or Claude can help you define the correct cron expression for your specific scheduling needs. Simply ask something like "Create a cron expression that runs every Tuesday at 3 PM" to get assistance.
178+
> **Tip**: Creating cron expressions can be challenging. AI tools like Google, ChatGPT, or Claude can help you define the correct cron expression for your specific scheduling needs. Simply ask something like "Create a cron expression that runs every Tuesday at 3 PM" to get assistance.
179179
180180
### Listeners Configuration
181181

@@ -194,12 +194,12 @@ Storage determines how job information is persisted and enables clustering:
194194

195195
1. **In-Memory (Default)**: No configuration needed
196196

197-
- Jobs are stored in memory and read/saved to the config file
198-
- No clustering support
197+
- Jobs are stored in memory and read/saved to the config file
198+
- No clustering support
199199

200200
2. **Database Storage**:
201201

202-
```json
202+
```json
203203
"store": {
204204
"type": "datasource",
205205
"datasource": "quartz",
@@ -208,11 +208,11 @@ Storage determines how job information is persisted and enables clustering:
208208
"clusterCheckinInterval": "15000",
209209
"misfireThreshold": "60000"
210210
}
211-
```
211+
```
212212

213213
3. **Redis Storage**:
214214

215-
```json
215+
```json
216216
"store": {
217217
"type": "redis",
218218
"host": "localhost",
@@ -227,7 +227,7 @@ Storage determines how job information is persisted and enables clustering:
227227
"ssl": false,
228228
"misfireThreshold": 60000
229229
}
230-
```
230+
```
231231

232232
#### Database Setup for Clustering
233233

0 commit comments

Comments
 (0)