diff options
author | Daniel Schadt <kingdread@gmx.de> | 2023-01-04 00:42:33 +0100 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2023-01-04 00:42:33 +0100 |
commit | cba02bdd0b8d7c10b9d25a3052e60ef9670eccf8 (patch) | |
tree | 0094dfe7d8b21a73e398d1018d7a35cc6efba083 /doc/administration | |
parent | 97e3b4c35049896f1692665e87d477f53ee9b9be (diff) | |
download | fietsboek-cba02bdd0b8d7c10b9d25a3052e60ef9670eccf8.tar.gz fietsboek-cba02bdd0b8d7c10b9d25a3052e60ef9670eccf8.tar.bz2 fietsboek-cba02bdd0b8d7c10b9d25a3052e60ef9670eccf8.zip |
Add fietscron script for maintenance
Diffstat (limited to 'doc/administration')
-rw-r--r-- | doc/administration/cronjobs.rst | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/doc/administration/cronjobs.rst b/doc/administration/cronjobs.rst new file mode 100644 index 0000000..a7d1a95 --- /dev/null +++ b/doc/administration/cronjobs.rst @@ -0,0 +1,29 @@ +Cronjobs +======== + +There are some maintenance jobs that should be done at regular intervals to +keep the instance running smoothly: + +* Old, abandoned uploads should be deleted from the database to free up the + space of the temporary GPX files. +* Tracks that are not present in the cache should have their cache entry + populated by pre-calculating their length/uphill/downhill/… values. This + makes accessing those values faster when a user requests the track's details. + +Fietsboek comes with a script to deal with those jobs: ``fietscron``. You can +run it like this:: + + fietscron -c path_to_config.ini + +You can use any mechanism you like to run this command at pre-defined intervals +(e.g. once an hour). You can find information about this in various sources: + +* https://wiki.archlinux.org/title/Systemd/Timers +* https://wiki.archlinux.org/title/Cron +* https://wiki.gentoo.org/wiki/Cron + +For example, the classic *cron*-way to run ``fietscron`` once per hour would be +to add the following to your *crontab* (using ``crontab -e``):: + + 0 * * * * /path/to/venv/bin/fietscron -c /path/to/settings.ini + |