@convex-dev/crons
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -10,3 +10,3 @@ { | ||
}, | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"license": "Apache-2.0", | ||
@@ -13,0 +13,0 @@ "keywords": [ |
@@ -5,4 +5,2 @@ # Crons Convex Component | ||
**Note: Convex Components are currently in beta.** | ||
<!-- START: Include on https://convex.dev/components --> | ||
@@ -15,2 +13,20 @@ | ||
```ts | ||
// Register a cron to run once per day. | ||
const daily = await crons.register( | ||
ctx, | ||
{ kind: "cron", cronspec: "0 0 * * *" }, | ||
internal.example.logStuff, | ||
{ message: "daily cron" } | ||
); | ||
// Register a cron to run every hour. | ||
const hourly = await crons.register( | ||
ctx, | ||
{ kind: "interval", ms: 3600000 }, | ||
internal.example.logStuff, | ||
{ message: "hourly cron" } | ||
); | ||
``` | ||
It supports intervals in milliseconds as well as cron schedules with the same | ||
@@ -17,0 +33,0 @@ format as the unix `cron` command: |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
136907
222
0