> ## Documentation Index
> Fetch the complete documentation index at: https://docs.malak.vc/llms.txt
> Use this file to discover all available pages before exploring further.

# Cron jobs

## Sending investors updates

We only schedule updates when you send in the dashboard. We do not send immediately.
Instead we rely on a background job to actually process the updates and send them to
the recipients.

```sh theme={null}
malak cron updates
```

<Tip>
  Ideally you want to configure this to run once a day. Or even once a month.
  Depending on how much updates you are sending. You can even run this every 30
  minutes
</Tip>

<Tip>
  We use chrome headless to render your charts, then convert them to images we
  can attach in the emails. For this purpose, it is highly recommended you add
  `google-chrome` to your machine or make it available
</Tip>

## Aggregating Deck viewing analytics

We collect reasonable data when a deck is shared and viewed. But to process them and make them
human readable ( more like dashbaord readable ), we have to aggregate and process them.

```sh theme={null}
malak cron deck-analytics
```

<Tip>
  Run this depending on how much delay is fine for the deck data analytics to
  show up in the dashboard. 30 minutes? once a day? 10 times a day?
</Tip>

## Sync integrations data

Please view [the dedicated page for this command](/self-hosting/integrations)

## Kubernetes

```yml theme={null}
---
apiVersion: batch/v1
kind: CronJob
metadata:
  name: malak-deck-analytics
  namespace: experiments
spec:
  schedule: "0 */2 * * *"
  failedJobsHistoryLimit: 3
  successfulJobsHistoryLimit: 0
  jobTemplate:
    spec:
      template:
        spec:
          restartPolicy: OnFailure
          imagePullSecrets:
            - name: regcred
          containers:
            - name: malak
              resources:
                requests:
                  memory: "128Mi"
                limits:
                  memory: "256Mi"
              image: ghcr.io/ayinke-llc/malak:45910b5e
              command:
                - /bin/sh
                - -c
                - /cmd cron decks-analytics
              envFrom:
                - secretRef:
                    name: infisicalsecret-malak
              imagePullPolicy: IfNotPresent
```
