@convex-dev/crons 0.1.2 β 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -76
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
**Note: Convex Components are currently in beta.**
|
|
6
6
|
|
|
7
|
+
<!-- START: Include on https://convex.dev/components -->
|
|
8
|
+
|
|
7
9
|
This Convex component provides functionality for registering and managing cron
|
|
8
10
|
jobs at runtime. Convex comes with built-in support for cron jobs but they must
|
|
9
11
|
be statically defined at deployment time. This library allows for dynamic
|
|
@@ -29,10 +31,13 @@ format as the unix `cron` command:
|
|
|
29
31
|
The design of this component is based on the Cronvex demo app that's described in
|
|
30
32
|
[this Stack post](https://stack.convex.dev/cron-jobs).
|
|
31
33
|
|
|
32
|
-
|
|
34
|
+
## Pre-requisite: Convex
|
|
35
|
+
|
|
36
|
+
You'll need an existing Convex project to use the component.
|
|
37
|
+
Convex is a hosted backend platform, including a database, serverless functions,
|
|
38
|
+
and a ton more you can learn about [here](https://docs.convex.dev/get-started).
|
|
33
39
|
|
|
34
|
-
|
|
35
|
-
follow any of the [Convex quickstarts](https://docs.convex.dev/home) to set one up.
|
|
40
|
+
Run `npm create convex` or follow any of the [quickstarts](https://docs.convex.dev/home) to set one up.
|
|
36
41
|
|
|
37
42
|
## Installation
|
|
38
43
|
|
|
@@ -45,7 +50,7 @@ npm install @convex-dev/crons
|
|
|
45
50
|
Create a `convex.config.ts` file in your app's `convex/` folder and install the component by calling `use`:
|
|
46
51
|
|
|
47
52
|
```ts
|
|
48
|
-
// convex/convex.config.
|
|
53
|
+
// convex/convex.config.ts
|
|
49
54
|
import { defineApp } from "convex/server";
|
|
50
55
|
import crons from "@convex-dev/crons/convex.config";
|
|
51
56
|
|
|
@@ -197,75 +202,4 @@ export const deleteSelf = internalMutation({
|
|
|
197
202
|
});
|
|
198
203
|
```
|
|
199
204
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
[Convex](https://convex.dev) is a hosted backend platform with a
|
|
203
|
-
built-in database that lets you write your
|
|
204
|
-
[database schema](https://docs.convex.dev/database/schemas) and
|
|
205
|
-
[server functions](https://docs.convex.dev/functions) in
|
|
206
|
-
[TypeScript](https://docs.convex.dev/typescript). Server-side database
|
|
207
|
-
[queries](https://docs.convex.dev/functions/query-functions) automatically
|
|
208
|
-
[cache](https://docs.convex.dev/functions/query-functions#caching--reactivity) and
|
|
209
|
-
[subscribe](https://docs.convex.dev/client/react#reactivity) to data, powering a
|
|
210
|
-
[realtime `useQuery` hook](https://docs.convex.dev/client/react#fetching-data) in our
|
|
211
|
-
[React client](https://docs.convex.dev/client/react). There are also clients for
|
|
212
|
-
[Python](https://docs.convex.dev/client/python),
|
|
213
|
-
[Rust](https://docs.convex.dev/client/rust),
|
|
214
|
-
[ReactNative](https://docs.convex.dev/client/react-native), and
|
|
215
|
-
[Node](https://docs.convex.dev/client/javascript), as well as a straightforward
|
|
216
|
-
[HTTP API](https://docs.convex.dev/http-api/).
|
|
217
|
-
|
|
218
|
-
The database supports
|
|
219
|
-
[NoSQL-style documents](https://docs.convex.dev/database/document-storage) with
|
|
220
|
-
[opt-in schema validation](https://docs.convex.dev/database/schemas),
|
|
221
|
-
[relationships](https://docs.convex.dev/database/document-ids) and
|
|
222
|
-
[custom indexes](https://docs.convex.dev/database/indexes/)
|
|
223
|
-
(including on fields in nested objects).
|
|
224
|
-
|
|
225
|
-
The
|
|
226
|
-
[`query`](https://docs.convex.dev/functions/query-functions) and
|
|
227
|
-
[`mutation`](https://docs.convex.dev/functions/mutation-functions) server functions have transactional,
|
|
228
|
-
low latency access to the database and leverage our
|
|
229
|
-
[`v8` runtime](https://docs.convex.dev/functions/runtimes) with
|
|
230
|
-
[determinism guardrails](https://docs.convex.dev/functions/runtimes#using-randomness-and-time-in-queries-and-mutations)
|
|
231
|
-
to provide the strongest ACID guarantees on the market:
|
|
232
|
-
immediate consistency,
|
|
233
|
-
serializable isolation, and
|
|
234
|
-
automatic conflict resolution via
|
|
235
|
-
[optimistic multi-version concurrency control](https://docs.convex.dev/database/advanced/occ) (OCC / MVCC).
|
|
236
|
-
|
|
237
|
-
The [`action` server functions](https://docs.convex.dev/functions/actions) have
|
|
238
|
-
access to external APIs and enable other side-effects and non-determinism in
|
|
239
|
-
either our
|
|
240
|
-
[optimized `v8` runtime](https://docs.convex.dev/functions/runtimes) or a more
|
|
241
|
-
[flexible `node` runtime](https://docs.convex.dev/functions/runtimes#nodejs-runtime).
|
|
242
|
-
|
|
243
|
-
Functions can run in the background via
|
|
244
|
-
[scheduling](https://docs.convex.dev/scheduling/scheduled-functions) and
|
|
245
|
-
[cron jobs](https://docs.convex.dev/scheduling/cron-jobs).
|
|
246
|
-
|
|
247
|
-
Development is cloud-first, with
|
|
248
|
-
[hot reloads for server function](https://docs.convex.dev/cli#run-the-convex-dev-server) editing via the
|
|
249
|
-
[CLI](https://docs.convex.dev/cli),
|
|
250
|
-
[preview deployments](https://docs.convex.dev/production/hosting/preview-deployments),
|
|
251
|
-
[logging and exception reporting integrations](https://docs.convex.dev/production/integrations/),
|
|
252
|
-
There is a
|
|
253
|
-
[dashboard UI](https://docs.convex.dev/dashboard) to
|
|
254
|
-
[browse and edit data](https://docs.convex.dev/dashboard/deployments/data),
|
|
255
|
-
[edit environment variables](https://docs.convex.dev/production/environment-variables),
|
|
256
|
-
[view logs](https://docs.convex.dev/dashboard/deployments/logs),
|
|
257
|
-
[run server functions](https://docs.convex.dev/dashboard/deployments/functions), and more.
|
|
258
|
-
|
|
259
|
-
There are built-in features for
|
|
260
|
-
[reactive pagination](https://docs.convex.dev/database/pagination),
|
|
261
|
-
[file storage](https://docs.convex.dev/file-storage),
|
|
262
|
-
[reactive text search](https://docs.convex.dev/text-search),
|
|
263
|
-
[vector search](https://docs.convex.dev/vector-search),
|
|
264
|
-
[https endpoints](https://docs.convex.dev/functions/http-actions) (for webhooks),
|
|
265
|
-
[snapshot import/export](https://docs.convex.dev/database/import-export/),
|
|
266
|
-
[streaming import/export](https://docs.convex.dev/production/integrations/streaming-import-export), and
|
|
267
|
-
[runtime validation](https://docs.convex.dev/database/schemas#validators) for
|
|
268
|
-
[function arguments](https://docs.convex.dev/functions/args-validation) and
|
|
269
|
-
[database data](https://docs.convex.dev/database/schemas#schema-validation).
|
|
270
|
-
|
|
271
|
-
Everything scales automatically, and itβs [free to start](https://www.convex.dev/plans).
|
|
205
|
+
<!-- END: Include on https://convex.dev/components -->
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"email": "support@convex.dev",
|
|
8
8
|
"url": "https://github.com/get-convex/crons/issues"
|
|
9
9
|
},
|
|
10
|
-
"version": "0.1.
|
|
10
|
+
"version": "0.1.3",
|
|
11
11
|
"license": "Apache-2.0",
|
|
12
12
|
"keywords": [
|
|
13
13
|
"convex",
|
|
@@ -50,8 +50,10 @@
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
|
+
"peerDependencies": {
|
|
54
|
+
"convex": "~1.16.5 || ~1.17.0"
|
|
55
|
+
},
|
|
53
56
|
"dependencies": {
|
|
54
|
-
"convex": "^1.16.5",
|
|
55
57
|
"cron-parser": "^4.9.0"
|
|
56
58
|
},
|
|
57
59
|
"devDependencies": {
|