You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All experimental flags have been promoted to non-experimental, but the experimental ones still work (for now). keepNames and autoDetectExternal now default to true.
Copy file name to clipboardExpand all lines: docs/tasks/scheduled.mdx
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,10 @@ title: "Scheduled tasks (cron)"
3
3
description: "A task that is triggered on a recurring schedule using cron syntax."
4
4
---
5
5
6
-
<Note>Scheduled tasks are only for recurring tasks. If you want to trigger a one-off task at a future time, you should [use the delay option](/triggering#delay).</Note>
6
+
<Note>
7
+
Scheduled tasks are only for recurring tasks. If you want to trigger a one-off task at a future
8
+
time, you should [use the delay option](/triggering#delay).
Copy file name to clipboardExpand all lines: packages/core/src/v3/config.ts
+58-35Lines changed: 58 additions & 35 deletions
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,25 @@ export type CompatibilityFlagFeatures = {
19
19
[keyinCompatibilityFlag]: boolean;
20
20
};
21
21
22
+
typeProcessKeepAlive=
23
+
|boolean
24
+
|{
25
+
enabled: boolean;
26
+
/**
27
+
* The maximum number of executions per process. If the process has run more than this number of times, it will be killed.
28
+
*
29
+
* @default 50
30
+
*/
31
+
maxExecutionsPerProcess?: number;
32
+
33
+
/**
34
+
* The maximum number of processes to keep alive in dev.
35
+
*
36
+
* @default 25
37
+
*/
38
+
devMaxPoolSize?: number;
39
+
};
40
+
22
41
exporttypeTriggerConfig={
23
42
/**
24
43
* @default "node"
@@ -171,30 +190,43 @@ export type TriggerConfig = {
171
190
external?: string[];
172
191
173
192
/**
174
-
* **WARNING: This is an experimental feature and might be removed in a future version.**
193
+
* This still works but use `autoDetectExternal` instead.
175
194
*
195
+
* @deprecated (use autoDetectExternal instead)
196
+
*/
197
+
experimental_autoDetectExternal?: boolean;
198
+
199
+
/**
176
200
* Automatically detect dependencies that shouldn't be bundled and mark them as external. For example, native modules.
177
201
*
178
-
* Turning this on will not affect dependencies that were manually added to the `external` array.
202
+
* Turn this off if you are having issues and want to manually specify all `external` dependencies.
179
203
*
180
-
* @default false
181
-
*
182
-
* @deprecated (experimental)
204
+
* @default true
183
205
*/
184
-
experimental_autoDetectExternal?: boolean;
206
+
autoDetectExternal?: boolean;
185
207
186
208
/**
187
-
* **WARNING: This is an experimental feature and might be removed in a future version.**
209
+
* This still works but use `keepNames` instead.
188
210
*
189
-
* Preserve the original names of functions and classes in the bundle. This can fix issues with frameworks that rely on the original names for registration and binding, for example MikroORM.
211
+
* @deprecated (use keepNames instead)
212
+
*/
213
+
experimental_keepNames?: boolean;
214
+
215
+
/* Set to false to minify the original names of functions and classes in the bundle.
216
+
* This can make bundles smaller at the cost of compatibility with frameworks that rely on function/class/variable names.
190
217
*
191
218
* @link https://esbuild.github.io/api/#keep-names
192
219
*
193
-
* @default false
220
+
* @default true
221
+
*/
222
+
keepNames?: boolean;
223
+
224
+
/**
225
+
* This still works but use `minify` instead.
194
226
*
195
-
* @deprecated (experimental)
227
+
* @deprecated (use minify instead)
196
228
*/
197
-
experimental_keepNames?: boolean;
229
+
experimental_minify?: boolean;
198
230
199
231
/**
200
232
* **WARNING: This is an experimental feature and might be removed in a future version.**
@@ -206,10 +238,8 @@ export type TriggerConfig = {
206
238
* @link https://esbuild.github.io/api/#minify
207
239
*
208
240
* @default false
209
-
*
210
-
* @deprecated (experimental)
211
241
*/
212
-
experimental_minify?: boolean;
242
+
minify?: boolean;
213
243
214
244
jsx?: {
215
245
/**
@@ -234,38 +264,31 @@ export type TriggerConfig = {
234
264
env?: Record<string,string>;
235
265
};
236
266
267
+
/**
268
+
* This still works but use `processKeepAlive` instead.
269
+
*
270
+
* @deprecated (use processKeepAlive instead)
271
+
*/
272
+
experimental_processKeepAlive?: ProcessKeepAlive;
273
+
237
274
/**
238
275
* @default false
239
276
* @description Keep the process alive after the task has finished running so the next task doesn't have to wait for the process to start up again.
240
277
*
241
278
* Note that the process could be killed at any time, and we don't make any guarantees about the process being alive for a certain amount of time
242
279
*/
243
-
experimental_processKeepAlive?:
244
-
|boolean
245
-
|{
246
-
enabled: boolean;
247
-
/**
248
-
* The maximum number of executions per process. If the process has run more than this number of times, it will be killed.
249
-
*
250
-
* @default 50
251
-
*/
252
-
maxExecutionsPerProcess?: number;
253
-
254
-
/**
255
-
* The maximum number of processes to keep alive in dev.
256
-
*
257
-
* @default 25
258
-
*/
259
-
devMaxPoolSize?: number;
260
-
};
280
+
processKeepAlive?: ProcessKeepAlive;
261
281
262
282
/**
263
283
* @default false
264
-
* @description When running the dev CLI, set the current working directory to the build directory.
284
+
* @description If set to true when running the dev CLI, the current working directory will be set to where the command is run from.
285
+
*
286
+
* The new default (when this flag isn't passed) is to set the current working directory to the build directory.
287
+
* This more closely matches the behavior of the CLI when running in production and is highly recommended.
265
288
*
266
-
* Currently, the process.cwd() is set to the root of the project.
289
+
* This impacts the value of process.cwd() in your task code.
0 commit comments