Skip to content

Commit

Permalink
add cronjobs document
Browse files Browse the repository at this point in the history
  • Loading branch information
sirodoht committed Jun 30, 2024
1 parent 771f3ff commit b07e7f7
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
3 changes: 1 addition & 2 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
- [File Structure Walkthrough](./file-structure-walkthrough.md)
- [Dependencies](./dependencies.md)
- [Deployment](./deployment.md)
- [Server Playbook](./server-playbook.md)
- [Admin and Moderation](./admin-moderation.md)
- [Cronjobs](./cronjobs.md)
- [Database Backup](./database-backup.md)
- [Server Migration](./server-migration.md)
20 changes: 0 additions & 20 deletions docs/src/admin-moderation.md

This file was deleted.

14 changes: 14 additions & 0 deletions docs/src/cronjobs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Cronjobs

Two every 5/10 minutes for notifications:

```
*/5 * * * * bash -c 'cd /var/www/mataroa && source .venv/bin/activate && source .envrc && python manage.py enqueue_notifications'
*/10 * * * * bash -c 'cd /var/www/mataroa && source .venv/bin/activate && source .envrc && python manage.py process_notifications'
```

One monthly for mail exports

```
0 0 * * * bash -c 'cd /var/www/mataroa && source .venv/bin/activate && source .envrc && python manage.py mail_exports'
```
7 changes: 7 additions & 0 deletions docs/src/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,10 @@ acme.sh --install-cert -d mataroa.blog -d *.mataroa.blog --key-file /etc/caddy/m
Note: acme.sh's default SSL provider is ZeroSSL which does not accept email with
plus-subaddressing. It will not error gracefully, just fail with a cryptic
message (tested with acmesh v3.0.7).

## Step 3: Cronjobs and Automated backups

There are a few cronjobs that need setting up and, of course, backups are essential:

* (3a) [Cronjobs](./cronjobs.md)
* (3b) [Database Backup](./database-backup.md)

0 comments on commit b07e7f7

Please sign in to comment.