Skip to content

Commit

Permalink
Add env vars for cron jobs (#398)
Browse files Browse the repository at this point in the history
* Add environment variables for directory sync and Google sync cron jobs

* added more info about the env vars for cron

---------

Co-authored-by: Deepak Prabhakara <[email protected]>
  • Loading branch information
Kiran K and deepakprabhakara authored Mar 22, 2024
1 parent 88153f1 commit 22cf692
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/directory-sync/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -856,3 +856,5 @@ curl -X POST \

</TabItem>
</Tabs>

Alternatively you can set the `DSYNC_WEBHOOK_BATCH_CRON_INTERVAL` env var.
2 changes: 2 additions & 0 deletions docs/directory-sync/providers/google.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ curl -X POST \
http://localhost:5225/api/v1/dsync/cron/sync-google
```

Alternatively you can set the `DSYNC_GOOGLE_CRON_INTERVAL` env var to enable the cron in the Jackson service.

Learn more about [Google Directory Sync API](/docs/directory-sync/api-reference#4-sync-directory).

### FAQ
Expand Down
14 changes: 13 additions & 1 deletion docs/jackson/deploy/env-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,19 @@ The following env vars are used to configure the directory sync feature.

### **DSYNC_WEBHOOK_BATCH_SIZE**

Enable batch processing of directory sync events. The value represents the number of events to batch together instead of sending each event individually. This requires you to configure a cron job to [process the queued events](/docs/directory-sync/api-reference#batch-processing-events)
Enable batch processing of directory sync events. The value represents the number of events to batch together instead of sending each event individually. This requires you to configure a cron job to [process the queued events](/docs/directory-sync/api-reference#batch-processing-events). Alternatively you can set `DSYNC_WEBHOOK_BATCH_CRON_INTERVAL` below if you are not deploying the service in an Edge environment.

### **DSYNC_WEBHOOK_BATCH_CRON_INTERVAL**

The cron interval at which to process the queued events. Provide a number in seconds. By default, the cron job is disabled.

NPM library option: `dsync.webhookBatchCronInterval`

### **DSYNC_GOOGLE_CRON_INTERVAL**

The cron interval at which to sync the Google Workspace. Provide a number in seconds. By default, the cron job is disabled.

NPM library option: `dsync.providers.google.cronInterval`

### **DSYNC_GOOGLE_CLIENT_ID**

Expand Down

0 comments on commit 22cf692

Please sign in to comment.