From 48648fe71a9614431d949229ce5f133a62dcf179 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Wed, 23 Jan 2019 02:29:57 -0500 Subject: [PATCH] Created Scheduled archiving (markdown) --- Scheduled-archiving.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Scheduled-archiving.md diff --git a/Scheduled-archiving.md b/Scheduled-archiving.md new file mode 100644 index 0000000..725281a --- /dev/null +++ b/Scheduled-archiving.md @@ -0,0 +1,27 @@ +## Schedule importing new links into your archive + +To schedule regular archiving you can use any task scheduler like `cron`, `at`, `sytsemd`, etc. + +ArchiveBox ignores links that are imported multiple times (keeping the earliest version that it's seen). +This means you can add cron jobs that regularly poll the same file or URL for new links, adding only new +ones as necessary. + +For some example configs, see the `etc/cron.d` and `etc/supervisord` folders. + +## Example: Import Firefox browser history every 24 hours + +This example exports your browser history and archives it once a day: + +**Create `/opt/ArchiveBox/bin/custom.sh`:** +```bash +#!/bin/bash + +cd /opt/ArchiveBox +./bin/archivebox-export-browser-history --firefox ./output/sources/firefox_history.json +./bin/archivebox ./output/sources/firefox_history.json >> /var/log/ArchiveBox.log +``` + +**Then create a new file `/etc/cron.d/Archivebox` to tell cron to run your script every 24 hours:** +```bash +0 24 * * * www-data /opt/ArchiveBox/bin/custom.sh +``` \ No newline at end of file